Skip to content

Commit

Permalink
patch timezone responding to own messages bug (#646)
Browse files Browse the repository at this point in the history
  • Loading branch information
Satty9361 authored Feb 26, 2020
1 parent 2ae3515 commit f83edbb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion timezonecompanion/plugin_bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,12 @@ func (p *Plugin) handleMessageCreate(evt *eventsystem.EventData) {
if m.GuildID == 0 {
return
}


//Additional check to ensure not reacting to own message
if m.Author.ID == common.BotUser.ID {
return
}

result, err := p.DateParser.Parse(m.Content, time.Now())
if err != nil || result == nil {
return
Expand Down

0 comments on commit f83edbb

Please sign in to comment.