Telegram check if user is admin

ICanKindOfCode picture ICanKindOfCode · Jan 7, 2018 · Viewed 8.5k times · Source

I am using the telegram bot api to make a bot. I have some commands that can only be sent from admins. Like kick and ban commands. How do I check if the sender is an admin or not? I am using the python-telegram-bot api. I do not want everyone to be able to ban members.

Answer

Sean picture Sean · Jan 7, 2018

You can use getChatMember method. See following instance:

Awesome Telegram Bot