Browse Source

Debugging

master
Gregory Rudolph 4 years ago
parent
commit
526af29391
Signed by: rudi
GPG Key ID: EF64F3CBD1A1EBDD
  1. 4
      discordMessage.go

4
discordMessage.go

@ -60,11 +60,15 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
if !cmd.RequiresAdmin { if !cmd.RequiresAdmin {
if !cmd.Exec(b) { if !cmd.Exec(b) {
s.ChannelMessageSend(config.AdminChannel, fmt.Sprintf("There was an error running %+v\n%+v", cmd.Name, cmd.Help)) 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 { } else {
if isAdmin(m.Member) { if isAdmin(m.Member) {
if !cmd.Exec(b) { if !cmd.Exec(b) {
s.ChannelMessageSend(config.AdminChannel, fmt.Sprintf("There was an error running %+v\n%+v", cmd.Name, cmd.Help)) 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)
} }
} }
} }

Loading…
Cancel
Save