|
|
@ -25,21 +25,18 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) { |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if strings.Contains(m.Embeds[0].Description, "Bump done!") { |
|
|
|
|
|
|
|
log.LogDebug("Finding string %+v", m.Embeds[0].Description) |
|
|
|
|
|
|
|
go bumpTimer() |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return |
|
|
|
return |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if m.Author.Bot || m.Author.ID == s.State.User.ID { |
|
|
|
if m.Author.Bot || m.Author.ID == s.State.User.ID { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if m.GuildID == "" { |
|
|
|
if m.GuildID == "" { |
|
|
|
handlePM(s, m) |
|
|
|
handlePM(s, m) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if isAdmin(m.Member) { |
|
|
|
if isAdmin(m.Member) { |
|
|
|
adminInteraction(s, m.Author.ID) |
|
|
|
adminInteraction(s, m.Author.ID) |
|
|
|
} |
|
|
|
} |
|
|
@ -57,6 +54,18 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) { |
|
|
|
activeInteraction(s, m.Author.ID) |
|
|
|
activeInteraction(s, m.Author.ID) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if strings.Contains(m.Content, "http") { |
|
|
|
|
|
|
|
safe := false |
|
|
|
|
|
|
|
for _, testURL := range config.WhitelistURLs { |
|
|
|
|
|
|
|
if strings.Contains(m.Content, testURL) { |
|
|
|
|
|
|
|
safe = true |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if !safe { |
|
|
|
|
|
|
|
s.ChannelMessageSend(m.ChannelID, "That domain is not approved by the admins. Please contact Admins if the domain should be whitelisted.") |
|
|
|
|
|
|
|
s.ChannelMessageDelete(m.ChannelID, m.ID) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
if strings.Contains(m.Content, s.State.User.ID) { |
|
|
|
if strings.Contains(m.Content, s.State.User.ID) { |
|
|
|
b := BotCommand{ |
|
|
|
b := BotCommand{ |
|
|
|
Session: s, |
|
|
|
Session: s, |
|
|
|