Skip to content

Commit

Permalink
Add handler for CommandExecuted
Browse files Browse the repository at this point in the history
  • Loading branch information
FloatingMilkshake committed Oct 16, 2024
1 parent 1d560d6 commit 0b1a469
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Events/InteractionEvents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace MechanicalMilkshake.Events;

public class InteractionEvents
{
public static async Task CommandInvoked(CommandsExtension _, CommandExecutedEventArgs e)
public static async Task CommandExecuted(CommandsExtension _, CommandExecutedEventArgs e)
{
await LogCmdUsage(e.Context);
}
Expand Down
3 changes: 3 additions & 0 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ internal static async Task Main()
// Error handling
extension.CommandErrored += ErrorEvents.CommandErrored;
// Logging
extension.CommandExecuted += Events.InteractionEvents.CommandExecuted;
// Interaction commands
#if DEBUG
// Register slash commands as guild commands in home server when
Expand Down

0 comments on commit 0b1a469

Please sign in to comment.