forked from kageru/discord-selphybot
remove debug stuff. refactor done \o/
This commit is contained in:
parent
5a1b51195b
commit
1e20ff9b45
|
@ -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)
|
||||||
|
|
2
main.go
2
main.go
|
@ -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})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user