aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--telebot.scm16
1 files changed, 12 insertions, 4 deletions
diff --git a/telebot.scm b/telebot.scm
index 34fc466..3970588 100644
--- a/telebot.scm
+++ b/telebot.scm
@@ -3,6 +3,7 @@
getUpdates
sendMessage
forwardMessage
+ resolve-query
sendPhoto
sendAudio
sendDocument
@@ -24,8 +25,11 @@
answerInlineQuery
;;; framework
is-message?
+ is-edited_message?
is-inline_query?
is-chosen_inline_result?
+ is-text?
+ is-location?
poll-updates
make-conversation-manager)
(import chicken scheme)
@@ -245,11 +249,15 @@
(define (update-predicate type)
(lambda (update)
- (not (equal? #f (alist-ref type update)))))
+ (not (equal? #f (resolve-query type update)))))
- (define is-message? (update-predicate 'message))
- (define is-inline_query? (update-predicate 'inline_query))
- (define is-chosen_inline_result? (update-predicate 'chosen_inline_result))
+ (define is-message? (update-predicate '(message)))
+ (define is-edited_message? (update-predicate '(edited_message)))
+ (define is-inline_query? (update-predicate '(inline_query)))
+ (define is-chosen_inline_result? (update-predicate '(chosen_inline_result)))
+
+ (define is-text? (update-predicate '(message text)))
+ (define is-location? (update-predicate '(message location)))
(define (poll-updates token handler)
(let ((offset 0))