Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mmqnym/telegram-autosend-example

Display how to auto send message in telegram bot
https://github.com/mmqnym/telegram-autosend-example

bot python telegram telegram-bot

Last synced: about 4 hours ago
JSON representation

Display how to auto send message in telegram bot

Awesome Lists containing this project

README

        

# Telegram auto send message
> Display how to auto send message in telegram bot

## How to get telegram chat_id

> First, You need to find telegram chat_id for auto send message to a group or channel.
1. Add the bot to the channel or group you want.
2. Send a message on the channel or group you choosed.
3. Enter `https://api.telegram.org//getUpdates` in your browser and you will see that the json file on the page contains the record of the message you just sent.
4. Find `id` in the `chat` block, which is the chat_id we are looking for.

> Paste the chat_id to complete the auto send function.
``` python
bot.sendMessage( chat_id = , text = msg, parse_mode = 'markdown' )
```

## Reference

- ##### [python-telegram-bot](https://github.com/python-telegram-bot/python-telegram-bot)
- ##### [schedule.py](https://schedule.readthedocs.io/en/stable/)

## License
[MIT License](https://github.com/0xmimiQ/telegram_autosend/blob/main/LICENSE)