remove debug stuff. refactor done \o/

This commit is contained in:
kageru 2018-06-06 17:44:56 +02:00
parent 5a1b51195b
commit 1e20ff9b45
Signed by untrusted user: kageru
GPG Key ID: 8282A2BEA4ADA3D2
2 changed files with 1 additions and 3 deletions

View File

@ -69,7 +69,6 @@ func evaluateMessage(s *discordgo.Session, m *discordgo.MessageCreate) {
log.Printf("<Self> %s", m.Content) log.Printf("<Self> %s", m.Content)
return return
} }
fmt.Println(m.Content)
for i, command := range commands { for i, command := range commands {
content := m.Content content := m.Content
if command.IgnoreCase { if command.IgnoreCase {
@ -114,7 +113,6 @@ func executeCommand(session *discordgo.Session, message *discordgo.MessageCreate
(!command.DMOnly || (getChannel(session.State, message.ChannelID).Type == discordgo.ChannelTypeDM))) { (!command.DMOnly || (getChannel(session.State, message.ChannelID).Type == discordgo.ChannelTypeDM))) {
log.Printf("Executed command %s triggered by user %s", command.Trigger, userToString(message.Author)) log.Printf("Executed command %s triggered by user %s", command.Trigger, userToString(message.Author))
fmt.Printf("Executed command %s triggered by user %s", command.Trigger, userToString(message.Author))
if command.Cooldown > 0 { if command.Cooldown > 0 {
commands[commandIndex].IsOnCooldown = true commands[commandIndex].IsOnCooldown = true
go removeCooldown(commandIndex) go removeCooldown(commandIndex)

View File

@ -69,7 +69,7 @@ func addCommands() {
registerCommand(Command{Trigger: "<@%s> <3", Output: "<@%s> <3", Type: CommandTypeFullMatch, AdminOnly: true, OutputIsReply: true, RequiresMention: true}) registerCommand(Command{Trigger: "<@%s> <3", Output: "<@%s> <3", Type: CommandTypeFullMatch, AdminOnly: true, OutputIsReply: true, RequiresMention: true})
// Debug // Debug
registerCommand(Command{Trigger: "echo", Type: CommandTypePrefix, Function: echoMessage}) // registerCommand(Command{Trigger: "echo", Type: CommandTypePrefix, Function: echoMessage})
} }