Browse Source

go vet

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

4
discordMessage.go

@ -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))

Loading…
Cancel
Save