aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2016-03-10 14:28:31 +0100
committerAdrian Kummerlaender2016-03-10 14:28:31 +0100
commitd0a5ae1f62945c45e67a12d1c8d4a6fa93262593 (patch)
treeb27e81cc9334dc257d601f2c76457367532b796c
parent376bd6ab78276fe7e33662bd89cfdb5fac6052b4 (diff)
downloadTelebot-d0a5ae1f62945c45e67a12d1c8d4a6fa93262593.tar
Telebot-d0a5ae1f62945c45e67a12d1c8d4a6fa93262593.tar.gz
Telebot-d0a5ae1f62945c45e67a12d1c8d4a6fa93262593.tar.bz2
Telebot-d0a5ae1f62945c45e67a12d1c8d4a6fa93262593.tar.lz
Telebot-d0a5ae1f62945c45e67a12d1c8d4a6fa93262593.tar.xz
Telebot-d0a5ae1f62945c45e67a12d1c8d4a6fa93262593.tar.zst
Telebot-d0a5ae1f62945c45e67a12d1c8d4a6fa93262593.zip
Implement `forwardMessage`
-rw-r--r--telebot.scm13
1 files changed, 10 insertions, 3 deletions
diff --git a/telebot.scm b/telebot.scm
index 6d6792d..0a24973 100644
--- a/telebot.scm
+++ b/telebot.scm
@@ -19,9 +19,16 @@
#f
read-json))
- (define (send-message token user message)
+ (define (send-message token chat-id text)
(with-input-from-request (get-query-url token "sendMessage")
- (list (cons 'chat_id user)
- (cons 'text message))
+ (list (cons 'chat_id chat-id)
+ (cons 'text text))
+ read-json))
+
+ (define (forward-message token chat-id from-chat-id message-id)
+ (with-input-from-request (get-query-url token "forwardMessage")
+ (list (cons 'chat_id chat-id)
+ (cons 'from_chat_id from-chat-id)
+ (cons 'message_id message-id))
read-json))
)