aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
Diffstat (limited to 'example')
-rw-r--r--example/guess.scm10
1 files changed, 5 insertions, 5 deletions
diff --git a/example/guess.scm b/example/guess.scm
index 2215380..e1b419c 100644
--- a/example/guess.scm
+++ b/example/guess.scm
@@ -22,6 +22,8 @@
(define (make-conversation chat_id)
(let ((chat_id chat_id)
(answer (random 100)))
+ (send chat_id
+ "Hi there! I just generated a random number for you to guess!")
(lambda (text)
(let ((guess (string->number text)))
(if (number? guess)
@@ -39,11 +41,9 @@
(print chat_id " -> \"" text "\"")
(if (hash-table-exists? conversations chat_id)
((hash-table-ref conversations chat_id) text)
- (begin (hash-table-set! conversations
- chat_id
- (make-conversation chat_id))
- (send chat_id
- "Hi there! I just generated a random number for you to guess!")))))
+ (hash-table-set! conversations
+ chat_id
+ (make-conversation chat_id)))))
(randomize)
(telebot:pollUpdates token