Compare commits

...
2 Commits
Author SHA1 Message Date
Dustin Pianalto 71efaa0d45 Increase default interval on status manager 2020-06-01 15:02:24 -08:00
Dustin Pianalto fc4b370a1e Fix bug when cmd is empty 2020-06-01 14:59:55 -08:00
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -116,6 +116,10 @@ func (c *CommandManager) OnMessage(session *discordgo.Session, m *discordgo.Mess
} }
} }
if len(cmd) < 1 {
return
}
var command *Command var command *Command
invoked := cmd[0] invoked := cmd[0]
if cmnd, ok := c.Commands[invoked]; ok { if cmnd, ok := c.Commands[invoked]; ok {
+1 -1
View File
@@ -20,7 +20,7 @@ func GetDefaultStatusManager() StatusManager {
"Golang!", "Golang!",
"DiscordGo!", "DiscordGo!",
"Disgoman!", "Disgoman!",
}, "30s"} }, "300s"}
} }
// HasHigherRole checks if the caller has a higher role than the target in the given guild // HasHigherRole checks if the caller has a higher role than the target in the given guild