From 77b022455eab6f77f1b438d22f90d6df8e2d5ab0 Mon Sep 17 00:00:00 2001 From: Sebastian Crane Date: Wed, 9 Feb 2022 21:47:05 +0000 Subject: [PATCH] Add !list IRC command to dispatch-command function Signed-off-by: Sebastian Crane --- src/bot.clj | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bot.clj b/src/bot.clj index 8449dee..68cf6d3 100644 --- a/src/bot.clj +++ b/src/bot.clj @@ -60,7 +60,7 @@ (let [{command :command game :game game-keyword :game-keyword} (split-message message)] - (when game + (if game (condp = command "!match" (match-string @state game nil) @@ -75,4 +75,9 @@ "!remove" (do (swap! state game/remove-player-of-game game-keyword sender) (remove-player-string nil game sender)) + nil) + + (condp = command + "!list" + (list-games-string @state nil nil) nil))))