Skip to content

Commit 7336745

Browse files
committed
actually execute slash commands
1 parent 1db01ef commit 7336745

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

DiscordBot.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ public void InitAndRun(string[] args)
319319
};
320320
Client.SlashCommandExecuted += (command) =>
321321
{
322+
Console.WriteLine($"Found slash command '{command.CommandName}' from user id {command.User.Id} in channel id {command.Channel.Id}");
322323
if (!ClientConfig.AllowSlashCommandsInDM && command.Channel is not IGuildChannel)
323324
{
324325
command.RespondAsync("Commands don't work there.", ephemeral: true);
@@ -328,6 +329,7 @@ public void InitAndRun(string[] args)
328329
{
329330
command.RespondAsync("Unknown command.", ephemeral: true);
330331
}
332+
cmd(command);
331333
return Task.CompletedTask;
332334
};
333335
Console.WriteLine("Logging in to Discord...");

0 commit comments

Comments
 (0)