Search code examples
telegramtelegram-bottelegram-webhooknode-telegram-bot-api

Is it possible for a telegram bot that is an “admin” of a channel to make a user of a channel an admin?


I have a telegram bot that asks a channel user a certain set of questions. Based on these answers, I would like that user to automatically become the admin of the telegram channel. Is that possible?

I would like to enable my bot to make other users admins for only one privilege - to add new subscribers


Solution

  • Yes.

    Bots can promote users using the method promoteChatMember. You can also select which privilege the user should have.

    Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Pass False for all boolean parameters to demote a user. Returns True on success.

    Check the documentation to find all the details for its usage.