Skip to content

Commit b8df1f8

Browse files
committed
fix(bot): check for nil
1 parent fee0bf0 commit b8df1f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bot/bot.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func (bot *AmputatorBot) GuildCreate(s *discordgo.Session, gc *discordgo.GuildCr
6363
// message is created on any channel that the authenticated bot has access to.
6464
func (bot *AmputatorBot) MessageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
6565
// This is a message the bot created itself
66-
if m.Author.ID == s.State.User.ID {
66+
if m.Author != nil && s.State.User != nil && m.Author.ID == s.State.User.ID {
6767
bot.createMessageEvent("", m.Message)
6868
return
6969
}

0 commit comments

Comments
 (0)