Fire and forget the command handler invocation

This commit is contained in:
Ben 2025-06-10 15:27:03 +02:00
parent 99e0e75ded
commit 1a763c6596
No known key found for this signature in database
GPG Key ID: 0F16E812E736C24B

View File

@ -20,7 +20,9 @@ namespace BiblioTech
Program.Log.Log($"Responding to '{Name}'");
var context = new CommandContext(command, command.Data.Options);
await command.RespondAsync(StartingMessage, ephemeral: IsEphemeral(context));
await Invoke(context);
// Fire and forget invocation handler. Return SlashCommandHandler immediately.
_ = Invoke(context);
}
catch (Exception ex)
{