|
|
@ -11,7 +11,7 @@ import ( |
|
|
|
func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) { |
|
|
|
func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) { |
|
|
|
defer log.PanicSafe() |
|
|
|
defer log.PanicSafe() |
|
|
|
var b BotCommand |
|
|
|
var b BotCommand |
|
|
|
if strings.HasPrefix(m.Content, s.State.User.Mention()) { |
|
|
|
if strings.Contains(m.Content, s.State.User.ID) { |
|
|
|
b = BotCommand{ |
|
|
|
b = BotCommand{ |
|
|
|
Session: s, |
|
|
|
Session: s, |
|
|
|
Message: m, |
|
|
|
Message: m, |
|
|
@ -50,7 +50,7 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) { |
|
|
|
if bump { |
|
|
|
if bump { |
|
|
|
s.ChannelMessageSend(m.ChannelID, fmt.Sprintf("%+v please say \"!d bump\" without the quotes to bump our server :)", m.Author.Mention())) |
|
|
|
s.ChannelMessageSend(m.ChannelID, fmt.Sprintf("%+v please say \"!d bump\" without the quotes to bump our server :)", m.Author.Mention())) |
|
|
|
} |
|
|
|
} |
|
|
|
if strings.HasPrefix(m.Content, s.State.User.Mention()) { |
|
|
|
if strings.Contains(m.Content, s.State.User.ID) { |
|
|
|
for _, cmd := range commands { |
|
|
|
for _, cmd := range commands { |
|
|
|
for _, keyword := range cmd.Keywords { |
|
|
|
for _, keyword := range cmd.Keywords { |
|
|
|
if strings.Contains(m.Content, keyword) { |
|
|
|
if strings.Contains(m.Content, keyword) { |
|
|
|