From cfefe1a793aa3c6e1d07eb1dce81c8e323a5c8c1 Mon Sep 17 00:00:00 2001 From: not manx Date: Wed, 15 Jul 2020 15:03:55 +0000 Subject: [PATCH] Get loli link correctly now --- loligram.lisp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/loligram.lisp b/loligram.lisp index 8abf133..06b9dcb 100644 --- a/loligram.lisp +++ b/loligram.lisp @@ -14,6 +14,9 @@ (loop for chat in (config-item :loligram-chats) do (setf (gethash chat *chats*) t))) +(defun get-loli () + (cdr (assoc :file-url (rori:loli-data (rori:loli-json "s") :file-url t)))) + (toot:handle (loligram :post (str "/loli/" (config-item :loligram-url)) :acceptor 'lolisp :content-type toot:@plain) @@ -27,5 +30,5 @@ ((not (gethash chat-id *chats*)) (dex:get (format nil *no-loli* chat-id))) ((string= text "/loli") - (dex:get (format nil *send-loli* chat-id (rori:loli-link "s")))))) + (dex:get (format nil *send-loli* chat-id (get-loli)))))) "mwee") ;; Return mwee