|
|
@ -62,8 +62,7 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) { |
|
|
|
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 { |
|
|
|
} else { |
|
|
|
for role := range m.Member.Roles { |
|
|
|
if isAdmin(m.Member) { |
|
|
|
if fmt.Sprintf("%+v", role) == config.AdminRole { |
|
|
|
|
|
|
|
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)) |
|
|
|
} |
|
|
|
} |
|
|
@ -74,7 +73,6 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func handlePM(s *discordgo.Session, m *discordgo.MessageCreate) { |
|
|
|
func handlePM(s *discordgo.Session, m *discordgo.MessageCreate) { |
|
|
|
defer log.PanicSafe() |
|
|
|
defer log.PanicSafe() |
|
|
|