aboutsummaryrefslogtreecommitdiff
path: root/bin/bot.ml
diff options
context:
space:
mode:
authorAdelyn Breedlove <[email protected]>2019-03-03 20:27:19 -0700
committerAdelyn Breedlove <[email protected]>2019-03-03 20:27:19 -0700
commit131d64e7b8b92ca63608bcfbcd564ec0cb592aa9 (patch)
tree60d7412e911069401ddc3671c643fec22c1482ae /bin/bot.ml
parentIT WORKS (diff)
downloaddisml-131d64e7b8b92ca63608bcfbcd564ec0cb592aa9.tar.xz
disml-131d64e7b8b92ca63608bcfbcd564ec0cb592aa9.zip
Add a restart command
Diffstat (limited to 'bin/bot.ml')
-rw-r--r--bin/bot.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/bot.ml b/bin/bot.ml
index d28c8be..8be038d 100644
--- a/bin/bot.ml
+++ b/bin/bot.ml
@@ -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 *)