Fix bug when cmd is empty
This commit is contained in:
parent
30065b313f
commit
fc4b370a1e
@ -116,6 +116,10 @@ func (c *CommandManager) OnMessage(session *discordgo.Session, m *discordgo.Mess
|
||||
}
|
||||
}
|
||||
|
||||
if len(cmd) < 1 {
|
||||
return
|
||||
}
|
||||
|
||||
var command *Command
|
||||
invoked := cmd[0]
|
||||
if cmnd, ok := c.Commands[invoked]; ok {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user