diff options
author | Colin Okay <cbeok@protonmail.com> | 2020-04-12 20:18:45 -0500 |
---|---|---|
committer | Colin Okay <cbeok@protonmail.com> | 2020-04-12 20:18:45 -0500 |
commit | 0806b9474a8bd882b39f73c85a3bd24713c62bdf (patch) | |
tree | 76eacc5b4bf472337b1a989b60fdb311ac2dc16f | |
parent | 2e7c31b591497ea71f92cb816c8ec0fc23a616ab (diff) |
send a more interesting message on failure
-rw-r--r-- | posterbot.lisp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/posterbot.lisp b/posterbot.lisp index be61382..92e6d76 100644 --- a/posterbot.lisp +++ b/posterbot.lisp @@ -42,10 +42,12 @@ is, downloads the image and posts it to the current room." (mxc-uri (upload *posterbot* file-name - (alexandria:read-file-into-byte-vector file-path) + (alexandria:read-file-into-byte-vector file-path) :content-type (make-mime-type word)))) - (send-image-message *posterbot* *room-id* file-name mxc-uri - :info (list :|mimetype| (make-mime-type word))))))) + (if mxc-uri + (send-image-message *posterbot* *room-id* file-name mxc-uri + :info (list :|mimetype| (make-mime-type word))) + (send-text-message *posterbot* *room-id* "I have failed you :(")))))) ;; look for links to images, one word at a time, downloading and ;; posting any images found to the room at the current *ROOM-ID* |