JunaidBabu / tdlib-python

Python wrapper for Telegram tdlib
17 stars 5 forks source link

send message #1

Closed rozalski closed 6 years ago

rozalski commented 6 years ago

Hi! How do I send a message to a user?

JunaidBabu commented 6 years ago

Try the snippet below (You need to know the chat_id):

td_send({'@type': 'sendMessage',
         'chat_id': chat_id,
         'input_message_content': {
             '@type': 'inputMessageText',
             'text': {
                 '@type': 'formattedText',
                 'text': 'test'
             }
         }})