3

Good day,

I missed something in telethondocumentation. All is clear with files, messages, document, but i cannot find, how to send emoji to other user. When I send emoji code like ;-) it sends it as raw message. If it is equals to send file, please help me to find list of emoji id to put into file variable. Official documentation provides functions below, it is not clear.

GetEmojiKeywordsDifferenceRequest
GetEmojiKeywordsLanguagesRequest    
GetEmojiKeywordsRequest
GetEmojiURLRequest

Please hint me with it :)

Vova
  • 563
  • 8
  • 20

1 Answers1

5

Emoji are just strings, like any other in Python. The ";-)" replacement for "" in official clients is done on the client side, not the server.

You should be able to paste the emoji directly into your code, or if your editor does not support it, use a Python unicode escape:

client.send_message(chat, '')
client.send_message(chat, '\U0001F609')

If you prefer to use text replacements in your code, install the emoji package:

import emoji
client.send_message(chat, emoji.emojize(':wink:'))

(Please note I have not tried the emoji module myself, see their documentation for available replacements.)

Lonami
  • 5,945
  • 2
  • 20
  • 38
  • some emojies from `emoji.emojize` work and teleram accepts it as emoji. Not all `emoji` symbols accepted, but enough for usage – Vova Aug 19 '19 at 13:56