|
|
@ -64,7 +64,12 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) { |
|
|
|
if !safe { |
|
|
|
if !safe { |
|
|
|
s.ChannelMessageSend(m.ChannelID, "That domain is not approved by the admins. Please contact Admins if the domain should be whitelisted.") |
|
|
|
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) |
|
|
|
s.ChannelMessageDelete(m.ChannelID, m.ID) |
|
|
|
s.ChannelMessageSend(config.AdminChannel, fmt.Sprintf("DELETED [%+v]: %+v", m.Author.Username, m.Content)) |
|
|
|
channel, err := s.Channel(m.ChannelID) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
s.ChannelMessageSend(config.AdminChannel, fmt.Sprintf("DELETED %+v [%+v]: %+v", m.Author.Mention(), m.ChannelID, m.Content)) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
s.ChannelMessageSend(config.AdminChannel, fmt.Sprintf("DELETED %+v [%+v]: %+v", m.Author.Mention(), channel.Name, m.Content)) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
parts := strings.Split(m.Content, " ") |
|
|
|
parts := strings.Split(m.Content, " ") |
|
|
|