Use the TransactionModuleBase for all commands that haven't implemented GeekbotCommandBase
This commit is contained in:
parent
f02c30e660
commit
a1f8d033c2
25 changed files with 40 additions and 25 deletions
|
@ -3,13 +3,14 @@ using System.Linq;
|
|||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
using Discord.Commands;
|
||||
using Geekbot.Core;
|
||||
using Geekbot.Core.ErrorHandling;
|
||||
using Geekbot.Core.Extensions;
|
||||
using PokeAPI;
|
||||
|
||||
namespace Geekbot.Bot.Commands.Games
|
||||
{
|
||||
public class Pokedex : ModuleBase
|
||||
public class Pokedex : TransactionModuleBase
|
||||
{
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ using Geekbot.Core.ErrorHandling;
|
|||
|
||||
namespace Geekbot.Bot.Commands.Integrations.LolMmr
|
||||
{
|
||||
public class LolMmr : ModuleBase
|
||||
public class LolMmr : TransactionModuleBase
|
||||
{
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ using System.Linq;
|
|||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
using Discord.Commands;
|
||||
using Geekbot.Core;
|
||||
using Geekbot.Core.Converters;
|
||||
using Geekbot.Core.ErrorHandling;
|
||||
using Geekbot.Core.Extensions;
|
||||
|
@ -11,7 +12,7 @@ using MtgApiManager.Lib.Service;
|
|||
|
||||
namespace Geekbot.Bot.Commands.Integrations
|
||||
{
|
||||
public class MagicTheGathering : ModuleBase
|
||||
public class MagicTheGathering : TransactionModuleBase
|
||||
{
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
private readonly IMtgManaConverter _manaConverter;
|
||||
|
|
|
@ -9,7 +9,7 @@ using Geekbot.Core.Extensions;
|
|||
|
||||
namespace Geekbot.Bot.Commands.Integrations.UbranDictionary
|
||||
{
|
||||
public class UrbanDictionary : ModuleBase
|
||||
public class UrbanDictionary : TransactionModuleBase
|
||||
{
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ using System.Text;
|
|||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
using Discord.Commands;
|
||||
using Geekbot.Core;
|
||||
using Geekbot.Core.Database;
|
||||
using Geekbot.Core.ErrorHandling;
|
||||
using Geekbot.Core.Extensions;
|
||||
|
@ -14,7 +15,7 @@ using HtmlAgilityPack;
|
|||
|
||||
namespace Geekbot.Bot.Commands.Integrations
|
||||
{
|
||||
public class Wikipedia : ModuleBase
|
||||
public class Wikipedia : TransactionModuleBase
|
||||
{
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
private readonly IWikipediaClient _wikipediaClient;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Discord.Commands;
|
||||
using Geekbot.Core;
|
||||
using Geekbot.Core.ErrorHandling;
|
||||
using Geekbot.Core.GlobalSettings;
|
||||
using Google.Apis.Services;
|
||||
|
@ -8,7 +9,7 @@ using Google.Apis.YouTube.v3;
|
|||
|
||||
namespace Geekbot.Bot.Commands.Integrations
|
||||
{
|
||||
public class Youtube : ModuleBase
|
||||
public class Youtube : TransactionModuleBase
|
||||
{
|
||||
private readonly IGlobalSettings _globalSettings;
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
|
|
|
@ -2,12 +2,13 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Discord.Commands;
|
||||
using Geekbot.Core;
|
||||
using Geekbot.Core.ErrorHandling;
|
||||
using Geekbot.Core.RandomNumberGenerator;
|
||||
|
||||
namespace Geekbot.Bot.Commands.Randomness
|
||||
{
|
||||
public class BenedictCumberbatchNameGenerator : ModuleBase
|
||||
public class BenedictCumberbatchNameGenerator : TransactionModuleBase
|
||||
{
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
private readonly IRandomNumberGenerator _randomNumberGenerator;
|
||||
|
|
|
@ -7,7 +7,7 @@ using Geekbot.Core.ErrorHandling;
|
|||
|
||||
namespace Geekbot.Bot.Commands.Randomness.Cat
|
||||
{
|
||||
public class Cat : ModuleBase
|
||||
public class Cat : TransactionModuleBase
|
||||
{
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ using Geekbot.Core.ErrorHandling;
|
|||
|
||||
namespace Geekbot.Bot.Commands.Randomness.Chuck
|
||||
{
|
||||
public class ChuckNorrisJokes : ModuleBase
|
||||
public class ChuckNorrisJokes : TransactionModuleBase
|
||||
{
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ using Geekbot.Core.ErrorHandling;
|
|||
|
||||
namespace Geekbot.Bot.Commands.Randomness.Dad
|
||||
{
|
||||
public class DadJokes : ModuleBase
|
||||
public class DadJokes : TransactionModuleBase
|
||||
{
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ using Geekbot.Core.ErrorHandling;
|
|||
|
||||
namespace Geekbot.Bot.Commands.Randomness.Dog
|
||||
{
|
||||
public class Dog : ModuleBase
|
||||
public class Dog : TransactionModuleBase
|
||||
{
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
using System.Threading.Tasks;
|
||||
using Discord.Commands;
|
||||
using Geekbot.Core;
|
||||
using Geekbot.Core.Media;
|
||||
|
||||
namespace Geekbot.Bot.Commands.Randomness
|
||||
{
|
||||
public class Fortune : ModuleBase
|
||||
public class Fortune : TransactionModuleBase
|
||||
{
|
||||
private readonly IFortunesProvider _fortunes;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ using Geekbot.Core.Extensions;
|
|||
|
||||
namespace Geekbot.Bot.Commands.Randomness.Greetings
|
||||
{
|
||||
public class Greetings : ModuleBase
|
||||
public class Greetings : TransactionModuleBase
|
||||
{
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ using Geekbot.Core.ErrorHandling;
|
|||
|
||||
namespace Geekbot.Bot.Commands.Randomness.Kanye
|
||||
{
|
||||
public class Kanye : ModuleBase
|
||||
public class Kanye : TransactionModuleBase
|
||||
{
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
using Discord.Commands;
|
||||
using Geekbot.Core;
|
||||
using Geekbot.Core.Media;
|
||||
|
||||
namespace Geekbot.Bot.Commands.Randomness
|
||||
{
|
||||
public class RandomAnimals : ModuleBase
|
||||
public class RandomAnimals : TransactionModuleBase
|
||||
{
|
||||
private readonly IMediaProvider _mediaProvider;
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ using System.Linq;
|
|||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
using Discord.Commands;
|
||||
using Geekbot.Core;
|
||||
using Geekbot.Core.Database;
|
||||
using Geekbot.Core.Database.Models;
|
||||
using Geekbot.Core.ErrorHandling;
|
||||
|
@ -11,7 +12,7 @@ using Geekbot.Core.Extensions;
|
|||
|
||||
namespace Geekbot.Bot.Commands.Randomness
|
||||
{
|
||||
public class Slap : ModuleBase
|
||||
public class Slap : TransactionModuleBase
|
||||
{
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
private readonly DatabaseContext _database;
|
||||
|
|
|
@ -3,6 +3,7 @@ using System.Linq;
|
|||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
using Discord.Commands;
|
||||
using Geekbot.Core;
|
||||
using Geekbot.Core.CommandPreconditions;
|
||||
using Geekbot.Core.Database;
|
||||
using Geekbot.Core.ErrorHandling;
|
||||
|
@ -11,7 +12,7 @@ using Geekbot.Core.Levels;
|
|||
|
||||
namespace Geekbot.Bot.Commands.User
|
||||
{
|
||||
public class GuildInfo : ModuleBase
|
||||
public class GuildInfo : TransactionModuleBase
|
||||
{
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
private readonly DatabaseContext _database;
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
using Discord.Commands;
|
||||
using Geekbot.Core;
|
||||
using Geekbot.Core.ErrorHandling;
|
||||
|
||||
namespace Geekbot.Bot.Commands.Utils
|
||||
{
|
||||
public class AvatarGetter : ModuleBase
|
||||
public class AvatarGetter : TransactionModuleBase
|
||||
{
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ using Geekbot.Core.ErrorHandling;
|
|||
|
||||
namespace Geekbot.Bot.Commands.Utils.Changelog
|
||||
{
|
||||
public class Changelog : ModuleBase
|
||||
public class Changelog : TransactionModuleBase
|
||||
{
|
||||
private readonly DiscordSocketClient _client;
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
|
|
|
@ -3,12 +3,13 @@ using System.Collections.Generic;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Discord.Commands;
|
||||
using Geekbot.Core;
|
||||
using Geekbot.Core.DiceParser;
|
||||
using Geekbot.Core.ErrorHandling;
|
||||
|
||||
namespace Geekbot.Bot.Commands.Utils
|
||||
{
|
||||
public class Dice : ModuleBase
|
||||
public class Dice : TransactionModuleBase
|
||||
{
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
private readonly IDiceParser _diceParser;
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Discord.Commands;
|
||||
using Geekbot.Core;
|
||||
using Geekbot.Core.Converters;
|
||||
using Geekbot.Core.ErrorHandling;
|
||||
|
||||
namespace Geekbot.Bot.Commands.Utils
|
||||
{
|
||||
public class Emojify : ModuleBase
|
||||
public class Emojify : TransactionModuleBase
|
||||
{
|
||||
private readonly IEmojiConverter _emojiConverter;
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
|
|
|
@ -3,11 +3,12 @@ using System.Text;
|
|||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
using Discord.Commands;
|
||||
using Geekbot.Core;
|
||||
using Geekbot.Core.ErrorHandling;
|
||||
|
||||
namespace Geekbot.Bot.Commands.Utils
|
||||
{
|
||||
public class Help : ModuleBase
|
||||
public class Help : TransactionModuleBase
|
||||
{
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ using Geekbot.Core.Extensions;
|
|||
|
||||
namespace Geekbot.Bot.Commands.Utils
|
||||
{
|
||||
public class Info : ModuleBase
|
||||
public class Info : TransactionModuleBase
|
||||
{
|
||||
private readonly DiscordSocketClient _client;
|
||||
private readonly CommandService _commands;
|
||||
|
|
|
@ -2,11 +2,12 @@ using System;
|
|||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using Discord.Commands;
|
||||
using Geekbot.Core;
|
||||
using Geekbot.Core.ErrorHandling;
|
||||
|
||||
namespace Geekbot.Bot.Commands.Utils
|
||||
{
|
||||
public class Lmgtfy : ModuleBase
|
||||
public class Lmgtfy : TransactionModuleBase
|
||||
{
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
using System.Threading.Tasks;
|
||||
using Discord.Commands;
|
||||
using Geekbot.Core;
|
||||
|
||||
namespace Geekbot.Bot.Commands.Utils
|
||||
{
|
||||
public class Ping : ModuleBase
|
||||
public class Ping : TransactionModuleBase
|
||||
{
|
||||
[Command("👀", RunMode = RunMode.Async)]
|
||||
[Summary("Look at the bot.")]
|
||||
|
|
Loading…
Reference in a new issue