Skip to content

Commit 1a763c6

Browse files
committed
Fire and forget the command handler invocation
1 parent 99e0e75 commit 1a763c6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Tools/BiblioTech/BaseCommand.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ public async Task SlashCommandHandler(SocketSlashCommand command)
2020
Program.Log.Log($"Responding to '{Name}'");
2121
var context = new CommandContext(command, command.Data.Options);
2222
await command.RespondAsync(StartingMessage, ephemeral: IsEphemeral(context));
23-
await Invoke(context);
23+
24+
// Fire and forget invocation handler. Return SlashCommandHandler immediately.
25+
_ = Invoke(context);
2426
}
2527
catch (Exception ex)
2628
{

0 commit comments

Comments
 (0)