-
Notifications
You must be signed in to change notification settings - Fork 27
Add support for sending messages to channels #7
Description
Yesterday Telegram added support for channels in the API, so this should be implemented in botogram.
But I don't want to push changes without the ability to test them, and currently no Telegram client supports marking a bot as administrator of a channel.
Now that all the major clients supports adding bots as channel administrators, this can be implemented. The Bot.send method should be fairly easy to fix, but I also want to add an API for the ones who just want to manage the channel.
This is because creating a bot instance just for sending a message to a channel, maybe in an big script, is just a waste of resources. So I designed this API:
import botogram
chan = botogram.channel("@channel_name", "12345678:api_key")
chan.send("Hi there!")botogram.channel will return an instance of botogram.Chat, so it won't trigger the initialization of the bot instance.
- Design the API
- Wait for Telegram clients to support this
- Do the actual implementation
- Write a chapter in the documentation