From da0a266b72f0919c5ed1bfa3fbc75e7d2f398229 Mon Sep 17 00:00:00 2001 From: Er2 Date: Mon, 28 Feb 2022 09:40:06 +0300 Subject: [PATCH] sendSticker --- api.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/api.lua b/api.lua index c1b2092..cc924b9 100644 --- a/api.lua +++ b/api.lua @@ -64,6 +64,7 @@ function api:reply(msg, txt, pmod, dwp, rmp, dnot) end function api:forward(cid, frcid, mid, dnot) + cid = argp(cid) return self:request('forwardMessage', { chat_id = cid, from_chat_id = frcid, @@ -72,6 +73,19 @@ function api:forward(cid, frcid, mid, dnot) }) end +function api:sendSticker(cid, stk, dnot, rmp, pcon, rtmid, swr) + cid, rmp = argp(cid, rmp) + return self:request('sendSticker', { + chat_id = cid, + sticker = stk, + disable_notification = dnot, + protect_content = pcon, + reply_to_message_id = rtmid, + allow_sending_without_reply = swr, + reply_markup = rmp, + }) +end + function api:sendPhoto(cid, f, cap, pmod, dnot, rtmid, rmp) cid, rmp, pmod = argp(cid, rmp, pmod) return self:request('sendPhoto', {