Add !help IRC command

Signed-off-by: Sebastian Crane <seabass-labrax@gmx.com>
This commit is contained in:
Sebastian Crane 2022-02-27 21:53:45 +00:00
parent 55379e1e81
commit 71deb2c91d
1 changed files with 10 additions and 0 deletions

View File

@ -48,6 +48,13 @@
", "
(sort-case-insensitive (map name (game/get-games state))))))
(defn help-string [& {:keys []}]
" !list - show all the games that have a list of players
!match game - announce a match of game to all of its players
!players game - show all the players of game
!add game - add yourself to the list of players for game
!remove game - remove yourself from the list of players for game")
(defn split-message [message]
(let [message-parts (str/split message #"\s")
command (if-let [x (first message-parts)] (str/lower-case x) "")
@ -81,4 +88,7 @@
(condp = command
"!list"
(list-games-string :state @state)
"!help"
(help-string)
nil))))