Skip to content

Commit

Permalink
feat: add dev command that throw exception
Browse files Browse the repository at this point in the history
  • Loading branch information
AlisaAkiron committed Jan 19, 2025
1 parent 5bf0ffd commit cc7c5a3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/PallasBot.Application.Command/SlashCommands/DevCommands.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using Discord.Interactions;
using PallasBot.Domain.Attributes;

namespace PallasBot.Application.Command.SlashCommands;

[DevOnly]
[RequireOwner]
public class DevCommands : InteractionModuleBase
{
[SlashCommand("throw-error", "Throws an error")]
public async Task ThrowError()
{
await RespondAsync("Will throw an error", ephemeral: true);
throw new InvalidOperationException("This is a test error");
}
}

0 comments on commit cc7c5a3

Please sign in to comment.