diff options
| author | Adelyn Breedlove <[email protected]> | 2019-03-03 20:27:19 -0700 |
|---|---|---|
| committer | Adelyn Breedlove <[email protected]> | 2019-03-03 20:27:19 -0700 |
| commit | 131d64e7b8b92ca63608bcfbcd564ec0cb592aa9 (patch) | |
| tree | 60d7412e911069401ddc3671c643fec22c1482ae /bin/bot.ml | |
| parent | IT WORKS (diff) | |
| download | disml-131d64e7b8b92ca63608bcfbcd564ec0cb592aa9.tar.xz disml-131d64e7b8b92ca63608bcfbcd564ec0cb592aa9.zip | |
Add a restart command
Diffstat (limited to 'bin/bot.ml')
| -rw-r--r-- | bin/bot.ml | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -7,7 +7,7 @@ module String = Base.String (* Define a function to handle message_create *)
let check_command (message:Message.t) =
(* Simple example of command parsing. *)
- let cmd, rest = match String.split ~on:' ' message.content with
+ let cmd, rest = match String.split ~on:' ' (String.lowercase message.content) with
| hd::tl -> hd, tl
| [] -> "", []
in match cmd with
@@ -19,6 +19,7 @@ let check_command (message:Message.t) = | "!echo" -> Commands.echo message rest
(* | "!cache" -> Commands.cache message rest *)
| "!shutdown" -> Commands.shutdown message rest
+ | "!restart" -> Commands.restart message rest
| "!rgm" -> Commands.request_members message rest
(* | "!new" -> Commands.new_guild message rest *)
(* | "!delall" -> Commands.delete_guilds message rest *)
|