Reputation: 12107
We are building an internal bot to monitor / control our software. It is NOT exposed to the public and will be used by other team members, either directly (as a direct chat) or through a few channels depending which side of the software is on topic.
The bot should do two things:
When a message arrives, I can get the channel id and the user id; while the user id is kind of guaranteed to exist for while, what is the situation with the channel?
Can I store the channel id and broadcast messages to all channels the bot is involved in? what happens if a channel is closed? do channel ids have lifetimes?
I can't really find anything online about the best practice regarding this scenario.
Upvotes: 0
Views: 2583
Reputation: 2106
I have doubt Understand what you want but it seems better know these things :
admin
permission in it right? Bots are same. so if your bot isn't admin anymore , the Telegram gives you error in response and you can check it and after facing that error delete that channel ID in your channels list.I hope this information help you but if you have any other question feel free to leave a comment and I'll update the post and answer you immediately.
Upvotes: 3