From 2d3341295e7c505f34e8717acb8ce8bcd907c5f4 Mon Sep 17 00:00:00 2001 From: Uko Kokņevičs Date: Sat, 18 Oct 2025 02:24:10 +0300 Subject: Add "tiny ..." trigger --- src/main.lisp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/main.lisp') diff --git a/src/main.lisp b/src/main.lisp index 9dfdc85..2e01411 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -9,7 +9,7 @@ (:import-from :ukkoclot/db :with-db) (:import-from :ukkoclot/serializing :fixup-value) (:import-from :ukkoclot/state :make-bot :bot-config :bot-power-on) - (:import-from :ukkoclot/strings :escape-xml :is-tg-whitespace-str :starts-with :starts-with-ignore-case) + (:import-from :ukkoclot/strings :escape-xml :is-tg-whitespace :is-tg-whitespace-str :starts-with :starts-with-ignore-case) (:local-nicknames (:jzon :com.inuoe.jzon)) (:export :main)) @@ -200,6 +200,16 @@ (unless (is-tg-whitespace-str the-text) (reply-message bot msg the-text)))) + ((starts-with-ignore-case text "tiny ") + (let ((the-text (subseq text 5))) + (unless (is-tg-whitespace-str the-text) + (reply-message bot msg + (map 'string #'(lambda (ch) + (if (is-tg-whitespace ch) + ch + #\.)) + the-text))))) + ((string-equal text "uwu") (reply-message bot msg "OwO")) -- cgit v1.2.3