diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2026-03-02 12:38:58 +0100 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2026-03-02 12:38:58 +0100 |
| commit | e566489af26fc9133a3509251812910e03b90c8c (patch) | |
| tree | 186a7aac60c64e3466f7a84f6fcf87e811b2486d /commands/rank.go | |
| parent | 443286aabc9d9e433625e0dd99e678754bbc74e5 (diff) | |
build(gokord): update to latest nightly
Diffstat (limited to 'commands/rank.go')
| -rw-r--r-- | commands/rank.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/commands/rank.go b/commands/rank.go index 07bbe75..aea2aa8 100644 --- a/commands/rank.go +++ b/commands/rank.go @@ -7,6 +7,7 @@ import ( "git.anhgelus.world/anhgelus/les-copaings-bot/exp" "git.anhgelus.world/anhgelus/les-copaings-bot/user" "github.com/nyttikord/gokord/bot" + "github.com/nyttikord/gokord/guild" "github.com/nyttikord/gokord/interaction" ) @@ -17,7 +18,7 @@ func Rank(ctx context.Context, dg bot.Session, i *interaction.ApplicationCommand opts := i.OptionMap() resp := interaction.NewMessageResponse() defer func() { - err := dg.InteractionAPI().Respond(i.Interaction, resp.Response()).Do(ctx) + err := interaction.Respond(i.Interaction, resp.Response()).Do(ctx) if err != nil { bot.Logger(ctx).Error("replying to interaction", "error", err) } @@ -29,7 +30,7 @@ func Rank(ctx context.Context, dg bot.Session, i *interaction.ApplicationCommand resp.IsEphemeral().Message("Imagine si les bots avaient un niveau :rolling_eyes:") return } - m, err = dg.GuildAPI().Member(i.GuildID, u.ID).Do(ctx) + m, err = guild.GetMember(i.GuildID, u.ID).Do(ctx) if err != nil { bot.Logger(ctx).Error("fetching guild member", "error", err, "user", u.Username, "guild", i.GuildID) resp.IsEphemeral().Message("Erreur : impossible de récupérer le membre") |
