Use GeebotBase in every command

This commit is contained in:
runebaas 2019-05-23 23:38:07 +02:00
parent 8d9c436cfc
commit 295a1d575d
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6
38 changed files with 77 additions and 40 deletions

View file

@ -7,6 +7,7 @@ using Discord.Commands;
using Discord.WebSocket;
using Geekbot.net.Database;
using Geekbot.net.Database.Models;
using Geekbot.net.Lib;
using Geekbot.net.Lib.CommandPreconditions;
using Geekbot.net.Lib.ErrorHandling;
using Geekbot.net.Lib.Extensions;
@ -17,7 +18,7 @@ namespace Geekbot.net.Commands.Admin
[Group("admin")]
[RequireUserPermission(GuildPermission.Administrator)]
[DisableInDirectMessage]
public class Admin : ModuleBase
public class Admin : GeekbotBase
{
private readonly DiscordSocketClient _client;
private readonly IErrorHandler _errorHandler;

View file

@ -4,6 +4,7 @@ using System.Threading.Tasks;
using Discord;
using Discord.Commands;
using Discord.WebSocket;
using Geekbot.net.Lib;
using Geekbot.net.Lib.CommandPreconditions;
using Geekbot.net.Lib.ErrorHandling;
using Geekbot.net.Lib.UserRepository;
@ -15,7 +16,7 @@ namespace Geekbot.net.Commands.Admin
[RequireUserPermission(GuildPermission.ManageMessages)]
[RequireUserPermission(GuildPermission.ManageRoles)]
[DisableInDirectMessage]
public class Mod : ModuleBase
public class Mod : GeekbotBase
{
private readonly DiscordSocketClient _client;
private readonly IErrorHandler _errorHandler;

View file

@ -3,6 +3,7 @@ using System.Threading.Tasks;
using Discord;
using Discord.Commands;
using Discord.WebSocket;
using Geekbot.net.Lib;
using Geekbot.net.Lib.ErrorHandling;
using Geekbot.net.Lib.GlobalSettings;
using Geekbot.net.Lib.Logger;
@ -12,7 +13,7 @@ namespace Geekbot.net.Commands.Admin.Owner
{
[Group("owner")]
[RequireOwner]
public class Owner : ModuleBase
public class Owner : GeekbotBase
{
private readonly DiscordSocketClient _client;
private readonly IErrorHandler _errorHandler;

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@ -7,6 +7,7 @@ using Discord.Commands;
using Discord.Net;
using Geekbot.net.Database;
using Geekbot.net.Database.Models;
using Geekbot.net.Lib;
using Geekbot.net.Lib.CommandPreconditions;
using Geekbot.net.Lib.ErrorHandling;
using Geekbot.net.Lib.Extensions;
@ -17,7 +18,7 @@ namespace Geekbot.net.Commands.Admin
{
[Group("role")]
[DisableInDirectMessage]
public class Role : ModuleBase
public class Role : GeekbotBase
{
private readonly DatabaseContext _database;
private readonly IErrorHandler _errorHandler;