From 84382b4ab4136c6ef5efd3e8a4ea2bd75d1ae9ae Mon Sep 17 00:00:00 2001 From: benbierens Date: Thu, 9 Nov 2023 11:14:17 +0100 Subject: [PATCH] Removes server-admin requirement for admin commands --- Tools/BiblioTech/BaseCommand.cs | 1 - Tools/BiblioTech/CommandHandler.cs | 6 ------ Tools/BiblioTech/Commands/AdminCommand.cs | 1 - 3 files changed, 8 deletions(-) diff --git a/Tools/BiblioTech/BaseCommand.cs b/Tools/BiblioTech/BaseCommand.cs index ce618f9..dc23d68 100644 --- a/Tools/BiblioTech/BaseCommand.cs +++ b/Tools/BiblioTech/BaseCommand.cs @@ -10,7 +10,6 @@ namespace BiblioTech public abstract string StartingMessage { get; } public abstract string Description { get; } public virtual CommandOption[] Options => Array.Empty(); - public virtual bool IsAdminCommand => false; public async Task SlashCommandHandler(SocketSlashCommand command) { diff --git a/Tools/BiblioTech/CommandHandler.cs b/Tools/BiblioTech/CommandHandler.cs index 433f657..88b45aa 100644 --- a/Tools/BiblioTech/CommandHandler.cs +++ b/Tools/BiblioTech/CommandHandler.cs @@ -30,12 +30,6 @@ namespace BiblioTech .WithName(c.Name) .WithDescription(c.Description); - if (c.IsAdminCommand) - { - builder.WithDefaultPermission(false); - builder.WithDefaultMemberPermissions(GuildPermission.Administrator); - } - foreach (var option in c.Options) { builder.AddOption(option.Build()); diff --git a/Tools/BiblioTech/Commands/AdminCommand.cs b/Tools/BiblioTech/Commands/AdminCommand.cs index 47a161a..9def408 100644 --- a/Tools/BiblioTech/Commands/AdminCommand.cs +++ b/Tools/BiblioTech/Commands/AdminCommand.cs @@ -25,7 +25,6 @@ namespace BiblioTech.Commands public override string Name => "admin"; public override string StartingMessage => "..."; public override string Description => "Admins only."; - public override bool IsAdminCommand => true; public override CommandOption[] Options => new CommandOption[] {