diff --git a/Commands/Owner/HomeServerCommands/ActivityCommands.cs b/Commands/Owner/HomeServerCommands/ActivityCommands.cs index 369fa57..0960a4a 100644 --- a/Commands/Owner/HomeServerCommands/ActivityCommands.cs +++ b/Commands/Owner/HomeServerCommands/ActivityCommands.cs @@ -66,6 +66,12 @@ public static async Task ChooseActvity(SlashCommandContext ctx, return; } + if (id > dbList.Length || id < 1) + { + await ctx.FollowupAsync(new DiscordFollowupMessageBuilder().WithContent("There's no activity with that ID!")); + return; + } + var index = 1; foreach (var item in dbList) { @@ -74,7 +80,7 @@ public static async Task ChooseActvity(SlashCommandContext ctx, index++; continue; } - + // Try to format stored activity as a DiscordActivity; on failure, show error & return var (success, activity) = ParseActivityType(new DiscordActivity { Name = item.Name }, item); if (!success)