|
|
|
@ -68,6 +68,8 @@ func (c *CommandManager) OnMessage(session *discordgo.Session, m *discordgo.Mess
|
|
|
|
break
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fmt.Println(prefix)
|
|
|
|
|
|
|
|
fmt.Println(prefixes)
|
|
|
|
if prefix == "" {
|
|
|
|
if prefix == "" {
|
|
|
|
return // If we didn't find a valid prefix then exit
|
|
|
|
return // If we didn't find a valid prefix then exit
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -84,13 +86,13 @@ func (c *CommandManager) OnMessage(session *discordgo.Session, m *discordgo.Mess
|
|
|
|
if cmnd, ok := c.Commands[invoked]; ok {
|
|
|
|
if cmnd, ok := c.Commands[invoked]; ok {
|
|
|
|
command = cmnd
|
|
|
|
command = cmnd
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
log.Fatal("Command Not Found")
|
|
|
|
fmt.Println("Command Not Found")
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
channel, err := session.Channel(m.ChannelID)
|
|
|
|
channel, err := session.Channel(m.ChannelID)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
log.Fatal("Couldn't retrieve Channel.")
|
|
|
|
fmt.Println("Couldn't retrieve Channel.")
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|