电报消息上设置了不同的表情符号

时间:2020-09-29 21:52:43

标签: python android telegram emoji

我正在开发一个用Python编写的电报机器人。使用官方的Telegram API发送消息。这是带标题的照片,因此我使用以下端点:https://api.telegram.org/{{bot_token}}/sendPhoto

问题是以下一个:

发送后,我会在我的Android手机(Realme X2 Pro,右屏幕截图)上看到此消息,似乎从消息的任意长度起,表情符号集从Apple更改为Google(根据篮球表情符号的方式而定)此处显示:https://emojipedia.org/basketball/)。但是,如果我在iPhone上看到此消息(左屏幕截图),则该消息将完美显示。

iOS and Android screenshots

这是我用来发送带标题的图片的代码:

url = 'https://api.telegram.org/{{bot_token}}/sendPhoto'
files = {'photo': open('final.jpg', 'rb')}
payload = dict(chat_id={{bot_id}}, caption=mensaje, parse_mode='MarkdownV2')
res = requests.post(url, data=payload, files=files) 

有人知道这是我做错了吗?

编辑

我一直在测试仅表情符号的消息,我得到的是:前50个表情符号与Apple套装一起显示;从51日开始,它看起来像Google套装。检查一下:

enter image description here

这是我用于此测试的代码:

money = u'\U0001F4B0'
message = ""
for i in range(200):
    message += money
url = 'https://api.telegram.org/{{bot_token}}/sendMessage'
payload = dict(chat_id={{bot_id}}, text=message)
res = requests.post(url, data=payload)

谢谢。

0 个答案:

没有答案