diff --git a/bot/sc_handler_register.go b/bot/sc_handler_register.go index 3f3b62d..a34e736 100644 --- a/bot/sc_handler_register.go +++ b/bot/sc_handler_register.go @@ -12,6 +12,9 @@ import ( // SlashCmdRegister handles the /register slash command func (b *Bot) SlashCmdRegister(s *discordgo.Session, i *discordgo.InteractionCreate) error { + if i.Member == nil || i.Member.User == nil { + return ErrUserNil + } u, err := b.Model.User.GetByUserID(i.Member.User.ID) if err != nil && !errors.Is(err, model.ErrUserNotExistent) { return err diff --git a/bot/version.go b/bot/version.go index 56ee7c1..a402a56 100644 --- a/bot/version.go +++ b/bot/version.go @@ -1,3 +1,3 @@ package bot -const Version = "0.2.6" +const Version = "0.2.7"