aboutsummaryrefslogtreecommitdiff
path: root/commands/credits.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/credits.go')
-rw-r--r--commands/credits.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/commands/credits.go b/commands/credits.go
index 340ea57..21dd8c7 100644
--- a/commands/credits.go
+++ b/commands/credits.go
@@ -1,20 +1,22 @@
package commands
import (
+ "context"
+
"github.com/anhgelus/gokord"
- "github.com/anhgelus/gokord/cmd"
"github.com/nyttikord/gokord/bot"
- "github.com/nyttikord/gokord/event"
+ "github.com/nyttikord/gokord/interaction"
)
-func Credits(s bot.Session, _ *event.InteractionCreate, _ cmd.OptionMap, resp *cmd.ResponseBuilder) {
+func Credits(ctx context.Context, dg bot.Session, i *interaction.ApplicationCommand) {
msg := "**Les Copaings**, le bot gérant les serveurs privés de [anhgelus](<https://anhgelus.world/>).\n"
msg += "Code source : <https://git.anhgelus.world/anhgelus/les-copaings-bot>\n\n"
msg += "Host du bot : " + gokord.BaseCfg.GetAuthor() + ".\n\n"
msg += "Utilise :\n- [anhgelus/gokord](<https://github.com/anhgelus/gokord>)\n"
msg += "- [Inter](<https://github.com/rsms/inter>)"
- err := resp.SetMessage(msg).Send()
+ resp := interaction.NewMessageResponse().Message(msg).Response()
+ err := dg.InteractionAPI().Respond(i.Interaction, resp).Do(ctx)
if err != nil {
- s.Logger().Error("sending credits", "error", err)
+ bot.Logger(ctx).Error("sending credits", "error", err)
}
}