chat.suggestions: updated regex for switch from ! to / command char

This commit is contained in:
john 2017-01-12 13:50:53 -05:00
parent 00d7a6a0f4
commit ce2a31b233
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@
(defn check-suggestion [db message] (defn check-suggestion [db message]
(when-let [suggestion-text (when (string? message) (when-let [suggestion-text (when (string? message)
(re-matches #"^![^\s]+\s" message))] (re-matches (re-pattern (str "^" chat-consts/command-char "[^\\s]+\\s")) message))]
(let [suggestion-text' (s/trim suggestion-text)] (let [suggestion-text' (s/trim suggestion-text)]
(->> (get-commands db) (->> (get-commands db)
(filter #(= suggestion-text' (->> % second :name (str chat-consts/command-char)))) (filter #(= suggestion-text' (->> % second :name (str chat-consts/command-char))))