Help?
This commit is contained in:
@ -11,10 +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()
|
||||||
if m.GuildID == "" {
|
|
||||||
handlePM(s, m)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if m.Author.ID == "302050872383242240" && len(m.Embeds) > 0 && strings.Contains(m.Embeds[0].Description, "minutes until the server can be bumped") {
|
if m.Author.ID == "302050872383242240" && len(m.Embeds) > 0 && strings.Contains(m.Embeds[0].Description, "minutes until the server can be bumped") {
|
||||||
log.LogDebug("Failed bump detected")
|
log.LogDebug("Failed bump detected")
|
||||||
re := regexp.MustCompile("Please wait another (.*) minutes until the server can be bumped")
|
re := regexp.MustCompile("Please wait another (.*) minutes until the server can be bumped")
|
||||||
@ -29,7 +26,10 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
|
|||||||
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 == "" {
|
||||||
|
handlePM(s, m)
|
||||||
|
return
|
||||||
|
}
|
||||||
if isAdmin(m.Member) {
|
if isAdmin(m.Member) {
|
||||||
adminInteraction(s, m.Author.ID)
|
adminInteraction(s, m.Author.ID)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user