This is a simple Telegram bot API implementation in Python3.
- Configure your bot and get your
<api token>
(See Telegram Bots); - Go to line 6 in
telegram.py
and paste your token inapiToken
variable; - Configure your message in
sendToTelegram(<chatID>, <message>)
;
Once people send messages to your bot (like the default first one /start
), your bot can get updates (see the response object) with some user data. Hence, you can filter the data by username
and get the chat or user ìd
, what you may use to send your messages from your bot to a specific user.