|
|
@ -13,14 +13,15 @@ func Parse(s *discordgo.Session, m *discordgo.MessageCreate) {
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if !strings.HasPrefix(m.Content, config.CommandPrefix) {
|
|
|
|
if !strings.HasPrefix(strings.ToLower(m.Content), config.CommandPrefix) {
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
commands := strings.Split(strings.TrimPrefix(m.Content, config.CommandPrefix), " ")
|
|
|
|
commands := strings.Split(m.Content[len(config.CommandPrefix):], " ")
|
|
|
|
|
|
|
|
first := strings.ToLower(commands[0])
|
|
|
|
|
|
|
|
|
|
|
|
for _, v := range list {
|
|
|
|
for _, v := range list {
|
|
|
|
if v.Name == commands[0] {
|
|
|
|
if v.Name == first {
|
|
|
|
v.Handler(s, commands, m)
|
|
|
|
v.Handler(s, commands, m)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|