diff --git a/src/ServerManagerDiscordBot/CommandManager.cs b/src/ServerManagerDiscordBot/CommandManager.cs index b338d01..1de9957 100644 --- a/src/ServerManagerDiscordBot/CommandManager.cs +++ b/src/ServerManagerDiscordBot/CommandManager.cs @@ -29,11 +29,12 @@ public async Task RegisterCommandsAsync() await InteractionService.AddModulesAsync(Assembly.GetEntryAssembly(), ServiceProvider); if (!AppSettings.GuildIds.Any()) - { + { Commands = await InteractionService.RegisterCommandsGloballyAsync(true); } else { + await InteractionService.RestClient.DeleteAllGlobalCommandsAsync(); foreach (var guildId in AppSettings.GuildIds) { Commands = await InteractionService.RegisterCommandsToGuildAsync(guildId, true);