diff --git a/Boyfriend.cs b/Boyfriend.cs index 3ba6a3f..4be3f18 100644 --- a/Boyfriend.cs +++ b/Boyfriend.cs @@ -31,7 +31,7 @@ public class Boyfriend { var services = host.Services; var slashService = services.GetRequiredService(); - _ = await slashService.UpdateSlashCommandsAsync(); + await slashService.UpdateSlashCommandsAsync(); await host.RunAsync(); } @@ -75,7 +75,7 @@ public class Boyfriend { .AddSingleton() .AddSingleton() .AddCommandTree() - .WithCommandGroup(); + .WithCommandGroup(); var responderTypes = typeof(Boyfriend).Assembly .GetExportedTypes() .Where(t => t.IsResponder()); diff --git a/Commands/BanCommand.cs b/Commands/BanCommandGroup.cs similarity index 98% rename from Commands/BanCommand.cs rename to Commands/BanCommandGroup.cs index 5149d8c..e773f48 100644 --- a/Commands/BanCommand.cs +++ b/Commands/BanCommandGroup.cs @@ -19,7 +19,7 @@ using Remora.Results; namespace Boyfriend.Commands; -public class BanCommand : CommandGroup { +public class BanCommandGroup : CommandGroup { private readonly IDiscordRestChannelAPI _channelApi; private readonly ICommandContext _context; private readonly GuildDataService _dataService; @@ -28,7 +28,7 @@ public class BanCommand : CommandGroup { private readonly IDiscordRestUserAPI _userApi; private readonly UtilityService _utility; - public BanCommand( + public BanCommandGroup( ICommandContext context, IDiscordRestChannelAPI channelApi, GuildDataService dataService, FeedbackService feedbackService, IDiscordRestGuildAPI guildApi, IDiscordRestUserAPI userApi, UtilityService utility) { @@ -62,7 +62,7 @@ public class BanCommand : CommandGroup { Messages.Culture = cfg.Culture; var existingBanResult = await _guildApi.GetGuildBanAsync(guildId.Value, target.ID, CancellationToken); - if (existingBanResult.IsDefined(out _)) { + if (existingBanResult.IsDefined()) { var embed = new EmbedBuilder().WithSmallTitle(Messages.UserAlreadyBanned, currentUser) .WithColour(ColorsList.Red).Build(); @@ -148,7 +148,7 @@ public class BanCommand : CommandGroup { Messages.Culture = cfg.Culture; var existingBanResult = await _guildApi.GetGuildBanAsync(guildId.Value, target.ID, CancellationToken); - if (!existingBanResult.IsDefined(out _)) { + if (!existingBanResult.IsDefined()) { var embed = new EmbedBuilder().WithSmallTitle(Messages.UserNotBanned, currentUser) .WithColour(ColorsList.Red).Build(); diff --git a/Data/GuildConfiguration.cs b/Data/GuildConfiguration.cs index 5170264..10a1553 100644 --- a/Data/GuildConfiguration.cs +++ b/Data/GuildConfiguration.cs @@ -14,7 +14,6 @@ public class GuildConfiguration { { "mctaylors-ru", new CultureInfo("tt-RU") } }; - public string Prefix { get; set; } = "!"; public string Language { get; set; } = "en"; public string WelcomeMessage { get; set; } = "default"; public bool ReceiveStartupMessages { get; set; }