fix(command): nil pointer reference on /top

This commit is contained in:
Anhgelus Morhtuuzh 2024-04-16 16:05:55 +02:00
parent 3bd8d28a97
commit ac73839583
No known key found for this signature in database
GPG key ID: CF4550297832A29F
2 changed files with 2 additions and 2 deletions

View file

@ -9,7 +9,7 @@ import (
) )
func Top(s *discordgo.Session, i *discordgo.InteractionCreate) { func Top(s *discordgo.Session, i *discordgo.InteractionCreate) {
xp.LastEventUpdate(s, xp.GetCopaing(i.User.ID, i.GuildID)) xp.LastEventUpdate(s, xp.GetCopaing(i.Member.User.ID, i.GuildID))
resp := utils.ResponseBuilder{C: s, I: i} resp := utils.ResponseBuilder{C: s, I: i}
err := resp.IsDeferred().Send() err := resp.IsDeferred().Send()
if err != nil { if err != nil {

View file

@ -125,7 +125,7 @@ func main() {
}, },
{ {
Type: gokord.GameStatus, Type: gokord.GameStatus,
Content: "Dev par @anhgelus", Content: "dev par @anhgelus",
Url: "", Url: "",
}, },
{ {