summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/roshambot.lisp5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/roshambot.lisp b/examples/roshambot.lisp
index 2669217..1062302 100644
--- a/examples/roshambot.lisp
+++ b/examples/roshambot.lisp
@@ -182,7 +182,8 @@
(t ;; otherwise send a direct message to each participant and make a new match instance
(let ((challenger-room (ensure-direct-room bot challenger))
(challenged-room (ensure-direct-room bot challenged)))
- (if (and (send-text-message
+ (if (and challenger-room challenged-room
+ (send-text-message
bot
challenger-room
"You have challenged ~a to roshambo. Reply with Rock, Paper, Scissors or Cancel."
@@ -204,7 +205,7 @@
(send-text-message bot room-id "Some kind of problem starting a roshambo match :("))))))
-(defclass roshambo-bot (granolin:client granolin:server-directory roshambot) ())
+(defclass roshambo-bot (granolin:client granolin:server-directory roshambot auto-joiner) ())
;; (defmethod handle-event :after ((bot roshambot-bot) (ev timeline-event) &optional room-id)
;; (format t "~a - ~a:~% ~a~%" room-id (granolin::sender ev) (granolin:msg-body ev)))