fix: Ignore all DMs

master
Luther Wen Xu 2020-05-31 22:57:58 +07:00
parent 74b92e4fd8
commit e28fffa193
Signed by: chanbakjsd
GPG Key ID: B7D77E3E9D102B70
2 changed files with 2 additions and 2 deletions

@ -26,7 +26,7 @@ var commands = []command{
} }
func Event(dg *discordgo.Session, m *discordgo.MessageCreate) { func Event(dg *discordgo.Session, m *discordgo.MessageCreate) {
if m.Author.Bot { if m.Author.Bot || m.GuildID == "" {
return return
} }

@ -12,7 +12,7 @@ import (
var ShouldListen = true var ShouldListen = true
func Event(dg *discordgo.Session, m *discordgo.MessageCreate) { func Event(dg *discordgo.Session, m *discordgo.MessageCreate) {
if !ShouldListen { if !ShouldListen || m.GuildID == "" {
return return
} }