diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2026-01-22 20:10:21 +0100 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2026-01-22 20:10:21 +0100 |
| commit | 8255a2e51454049f3ac1532f6e1125f528691c37 (patch) | |
| tree | 064b7dbdd07efd85162c954d20c1dcd831ea84f6 /commands/config.go | |
| parent | eee2a3873e11bef6bee2f71cf429c8a870c5383c (diff) | |
refactor(commands): use new handlers
Diffstat (limited to 'commands/config.go')
| -rw-r--r-- | commands/config.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/commands/config.go b/commands/config.go index 1878bdb..12d1c4d 100644 --- a/commands/config.go +++ b/commands/config.go @@ -121,8 +121,7 @@ func ConfigResponse(guildID string) *interaction.Response { } func ConfigCommand(ctx context.Context, dg bot.Session, i *interaction.ApplicationCommand) { - err := dg.InteractionAPI().Respond(i.Interaction, ConfigResponse(i.GuildID)) - + err := dg.InteractionAPI().Respond(i.Interaction, ConfigResponse(i.GuildID)).Do(ctx) if err != nil { bot.Logger(ctx).Error("sending config", "error", err) } @@ -131,8 +130,8 @@ func ConfigCommand(ctx context.Context, dg bot.Session, i *interaction.Applicati func ConfigMessageComponent(ctx context.Context, dg bot.Session, i *interaction.MessageComponent) { response := ConfigResponse(i.GuildID) response.Type = types.InteractionResponseUpdateMessage - err := dg.InteractionAPI().Respond(i.Interaction, response) + err := dg.InteractionAPI().Respond(i.Interaction, response).Do(ctx) if err != nil { bot.Logger(ctx).Error("sending config", "error", err) } @@ -141,8 +140,8 @@ func ConfigMessageComponent(ctx context.Context, dg bot.Session, i *interaction. func ConfigModal(ctx context.Context, dg bot.Session, i *interaction.ModalSubmit) { response := ConfigResponse(i.GuildID) response.Type = types.InteractionResponseUpdateMessage - err := dg.InteractionAPI().Respond(i.Interaction, response) + err := dg.InteractionAPI().Respond(i.Interaction, response).Do(ctx) if err != nil { bot.Logger(ctx).Error("sending config", "error", err) } |
