|
|
|
@ -52,14 +52,14 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
@@ -52,14 +52,14 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
|
|
|
|
|
log.LogDebug("%+v found!", keyword) |
|
|
|
|
b.Command = keyword |
|
|
|
|
if !cmd.RequiresAdmin { |
|
|
|
|
log.LogDebug("%+v does not require admin, running!") |
|
|
|
|
log.LogDebug("%+v does not require admin, running!", cmd.Name) |
|
|
|
|
if !cmd.Exec(b) { |
|
|
|
|
s.ChannelMessageSend(config.AdminChannel, fmt.Sprintf("There was an error running %+v\n%+v", cmd.Name, cmd.Help)) |
|
|
|
|
} else { |
|
|
|
|
log.LogInfo("Ran command %+v for %+v", cmd.Name, m.Author.Username) |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
log.LogDebug("%+v does require admin, checking!") |
|
|
|
|
log.LogDebug("%+v does require admin, checking!", cmd.Name) |
|
|
|
|
if isAdmin(m.Member) { |
|
|
|
|
if !cmd.Exec(b) { |
|
|
|
|
s.ChannelMessageSend(config.AdminChannel, fmt.Sprintf("There was an error running %+v\n%+v", cmd.Name, cmd.Help)) |
|
|
|
|