Use this method to send .webp stickers.
        :param chat_id:
        :param data:
        :param reply_to_message_id:
        :param reply_markup:
        :return: API reply.
331863
def send_sticker(self, chat_id, data, reply_to_message_id=None, reply_markup=None, disable_notification=None,
                     timeout=None):
        
        return types.Message.de_json(
            apihelper.send_data(self.token, chat_id, data, 'sticker', reply_to_message_id, reply_markup,
                                disable_notification, timeout))
1178954
function(w, data) {
            return (w.senderToNameMap[data.id] || data.id) + ' ' +
                (data.collapsed ? 'mini' : 'maxi') + 'mized the chat';
        }
377141
def reply_with_message(self, rep_msg):
        
        self._post_reply()
        return self.client_connection.reply(rep_msg, self.msg)
380478
def sendMessage(self,chat_id,text,parse_mode=None,disable_web=None,reply_msg_id=None,markup=None):
		'''  '''
		payload={'chat_id' : chat_id, 'text' : text, 'parse_mode': parse_mode , 'disable_web_page_preview' : disable_web , 'reply_to_message_id' : reply_msg_id}
		
		if(markup):
			payload['reply_markup']=json.dumps(markup)
			
		response_str = self._command('sendMessage',payload,method='post')
		
		return _validate_response_msg(response_str)
834159
def send(self, sender: PytgbotApiBot):
        
        return sender.send_message(
            # receiver, self.media, disable_notification=self.disable_notification, reply_to_message_id=reply_id
            text=self.text, chat_id=self.receiver, reply_to_message_id=self.reply_id, parse_mode=self.parse_mode, disable_web_page_preview=self.disable_web_page_preview, disable_notification=self.disable_notification, reply_markup=self.reply_markup
        )
104801
def _getSendData(self, message=None, thread_id=None, thread_type=ThreadType.USER):
        """"""
        messageAndOTID = generateOfflineThreadingID()
        timestamp = now()
        data = {
            "client": "mercury",
            "author": "fbid:{}".format(self._uid),
            "timestamp": timestamp,
            "source": "source:chat:web",
            "offline_threading_id": messageAndOTID,
            "message_id": messageAndOTID,
            "threading_id": generateMessageID(self._client_id),
            "ephemeral_ttl_mode:": "0",
        }

        # Set recipient
        if thread_type in [ThreadType.USER, ThreadType.PAGE]:
            data["other_user_fbid"] = thread_id
        elif thread_type == ThreadType.GROUP:
            data["thread_fbid"] = thread_id

        if message is None:
            message = Message()

        if message.text or message.sticker or message.emoji_size:
            data["action_type"] = "ma-type:user-generated-message"

        if message.text:
            data["body"] = message.text

        for i, mention in enumerate(message.mentions):
            data["profile_xmd[{}][id]".format(i)] = mention.thread_id
            data["profile_xmd[{}][offset]".format(i)] = mention.offset
            data["profile_xmd[{}][length]".format(i)] = mention.length
            data["profile_xmd[{}][type]".format(i)] = "p"

        if message.emoji_size:
            if message.text:
                data["tags[0]"] = "hot_emoji_size:" + message.emoji_size.name.lower()
            else:
                data["sticker_id"] = message.emoji_size.value

        if message.sticker:
            data["sticker_id"] = message.sticker.uid

        if message.quick_replies:
            xmd = {"quick_replies": []}
            for quick_reply in message.quick_replies:
                q = dict()
                q["content_type"] = quick_reply._type
                q["payload"] = quick_reply.payload
                q["external_payload"] = quick_reply.external_payload
                q["data"] = quick_reply.data
                if quick_reply.is_response:
                    q["ignore_for_webhook"] = False
                if isinstance(quick_reply, QuickReplyText):
                    q["title"] = quick_reply.title
                if not isinstance(quick_reply, QuickReplyLocation):
                    q["image_url"] = quick_reply.image_url
                xmd["quick_replies"].append(q)
            if len(message.quick_replies) == 1 and message.quick_replies[0].is_response:
                xmd["quick_replies"] = xmd["quick_replies"][0]
            data["platform_xmd"] = json.dumps(xmd)

        if message.reply_to_id:
            data["replied_to_message_id"] = message.reply_to_id

        return data
973852
def Message(self, Id=0):
        
        o = ChatMessage(self, Id)
        o.Status # Test if such an id is known.
        return o
1033133
async def update_emoji(**payload):
    
    data = payload["data"]
    web_client = payload["web_client"]
    channel_id = data["item"]["channel"]
    user_id = data["user"]

    # Get the original tutorial sent.
    onboarding_tutorial = onboarding_tutorials_sent[channel_id][user_id]

    # Mark the reaction task as completed.
    onboarding_tutorial.reaction_task_completed = True

    # Get the new message payload
    message = onboarding_tutorial.get_message_payload()

    # Post the updated message in Slack
    updated_message = await web_client.chat_update(**message)

    # Update the timestamp saved on the onboarding tutorial object
    onboarding_tutorial.timestamp = updated_message["ts"]
771622
def send(self, sender: PytgbotApiBot):
        
        return sender.send_contact(
            # receiver, self.media, disable_notification=self.disable_notification, reply_to_message_id=reply_id
            phone_number=self.phone_number, first_name=self.first_name, chat_id=self.receiver, reply_to_message_id=self.reply_id, last_name=self.last_name, vcard=self.vcard, disable_notification=self.disable_notification, reply_markup=self.reply_markup
        )
747962
def get_by_id(self, reply_id):
        '''
        
        '''
        reply = MReply.get_by_uid(reply_id)
        logger.info('get_reply: {0}'.format(reply_id))

        self.render('misc/reply/show_reply.html',
                    reply=reply,
                    username=reply.user_name,
                    date=reply.date,
                    vote=reply.vote,
                    uid=reply.uid,
                    userinfo=self.userinfo,
                    kwd={})
155313
def send(self, chat_id, msg_type, **kwargs):
        
        data = {
            'chatid': chat_id,
            'safe': kwargs.get('safe') or 0
        }
        data.update(self._build_msg_content(msg_type, **kwargs))

        return self._post('appchat/send', data=data)
1121277
async def setChatStickerSet(self, chat_id, sticker_set_name):
        
        p = _strip(locals())
        return await self._api_request('setChatStickerSet', _rectify(p))
579814
def send_text_message(self, user_id, content, kf_account=None):
        
        data = {
            "touser": user_id,
            "msgtype": "text",
            "text": {
                "content": content
            }
        }
        if kf_account is not None:
            data['customservice'] = {'kf_account': kf_account}
        return self.post(
            url="https://api.weixin.qq.com/cgi-bin/message/custom/send",
            data=data
        )
655151
def send_sticker(self, sticker, **options):
        
        return self.bot.api_call(
            "sendSticker", chat_id=str(self.id), sticker=sticker, **options
        )
407430
def send_document(self, chat_id, data, reply_to_message_id=None, caption=None, reply_markup=None,
                      parse_mode=None, disable_notification=None, timeout=None):
        
        return types.Message.de_json(
            apihelper.send_data(self.token, chat_id, data, 'document', reply_to_message_id, reply_markup,
                                parse_mode, disable_notification, timeout, caption=caption))
25641
def make_reply(self):
        
        return Message(
            to=str(self.sender),
            sender=str(self.to),
            body=self.body,
            thread=self.thread,
            metadata=self.metadata
        )
685203
def reply(self,message,message_type):
        
        if message_type == MULTIPART:
            raise Exception("Unsupported reply type")
            
        super(Replier,self).send(message,message_type)