platypush/plugins/chat/telegram/__init__.py
def promote_chat_member(self, chat_id: Union[str, int],
                            user_id: int,
                            can_change_info: Optional[bool] = None,
                            can_post_messages: Optional[bool] = None,
                            can_edit_messages: Optional[bool] = None,
                            can_delete_messages: Optional[bool] = None,
                            can_invite_users: Optional[bool] = None,
                            can_restrict_members: Optional[bool] = None,
                            can_promote_members: Optional[bool] = None,
                            can_pin_messages: Optional[bool] = None,
                            timeout: int = 20):
        """
        Promote or demote a member.

        :param chat_id: Chat ID. Can be either a numerical ID or a unique identifier in the format ``@channelname``.
            In order to get your own Telegram chat_id open a conversation with
            `@IDBot <https://telegram.me/IDBot>`_ and type ``/start`` followed by ``/getid``. Similar procedures
            also exist to get a group or channel chat_id - just Google for "Telegram get channel/group chat_id".

        :param user_id: Unique user ID.
        :param can_change_info: Pass True if the user can change channel info.
        :param can_post_messages: Pass True if the user can post messages.
        :param can_edit_messages: Pass True if the user can edit messages.
        :param can_delete_messages: Pass True if the user can delete messages.
        :param can_invite_users: Pass True if the user can invite other users to the channel/group.
        :param can_restrict_members: Pass True if the user can restrict the permissions of other users.
        :param can_promote_members: Pass True if the user can promote mebmers.
        :param can_pin_messages: Pass True if the user can pin messages.
        :param timeout: Request timeout (default: 20 seconds)
        """

        telegram = self.get_telegram()
        telegram.bot.promote_chat_member(
            chat_id=chat_id,
            user_id=user_id,
            can_change_info=can_change_info,
            can_post_messages=can_post_messages,
            can_edit_messages=can_edit_messages,
            can_delete_messages=can_delete_messages,
            can_invite_users=can_invite_users,
            can_restrict_members=can_restrict_members,
            can_promote_members=can_promote_members,
            can_pin_messages=can_pin_messages,
            timeout=timeout)

        Promote or demote a member.

        :param chat_id: Chat ID. Can be either a numerical ID or a unique identifier in the format ``@channelname``.
            In order to get your own Telegram chat_id open a conversation with
            `@IDBot <https://telegram.me/IDBot>`_ and type ``/start`` followed by ``/getid``. Similar procedures
            also exist to get a group or channel chat_id - just Google for "Telegram get channel/group chat_id".

        :param user_id: Unique user ID.
        :param can_change_info: Pass True if the user can change channel info.
        :param can_post_messages: Pass True if the user can post messages.
        :param can_edit_messages: Pass True if the user can edit messages.
        :param can_delete_messages: Pass True if the user can delete messages.
        :param can_invite_users: Pass True if the user can invite other users to the channel/group.
        :param can_restrict_members: Pass True if the user can restrict the permissions of other users.
        :param can_promote_members: Pass True if the user can promote mebmers.
        :param can_pin_messages: Pass True if the user can pin messages.
        :param timeout: Request timeout (default: 20 seconds)
        
Promote or demote a member.
Promote or demote a member .
def promote_chat_member(self, chat_id: Union[str, int],
                            user_id: int,
                            can_change_info: Optional[bool] = None,
                            can_post_messages: Optional[bool] = None,
                            can_edit_messages: Optional[bool] = None,
                            can_delete_messages: Optional[bool] = None,
                            can_invite_users: Optional[bool] = None,
                            can_restrict_members: Optional[bool] = None,
                            can_promote_members: Optional[bool] = None,
                            can_pin_messages: Optional[bool] = None,
                            timeout: int = 20):
        telegram = self.get_telegram()
        telegram.bot.promote_chat_member(
            chat_id=chat_id,
            user_id=user_id,
            can_change_info=can_change_info,
            can_post_messages=can_post_messages,
            can_edit_messages=can_edit_messages,
            can_delete_messages=can_delete_messages,
            can_invite_users=can_invite_users,
            can_restrict_members=can_restrict_members,
            can_promote_members=can_promote_members,
            can_pin_messages=can_pin_messages,
            timeout=timeout)
def promote_chat_member ( self , chat_id : Union [ str , int ] , user_id : int , can_change_info : Optional [ bool ] = None , can_post_messages : Optional [ bool ] = None , can_edit_messages : Optional [ bool ] = None , can_delete_messages : Optional [ bool ] = None , can_invite_users : Optional [ bool ] = None , can_restrict_members : Optional [ bool ] = None , can_promote_members : Optional [ bool ] = None , can_pin_messages : Optional [ bool ] = None , timeout : int = 20 ) : telegram = self . get_telegram ( ) telegram . bot . promote_chat_member ( chat_id = chat_id , user_id = user_id , can_change_info = can_change_info , can_post_messages = can_post_messages , can_edit_messages = can_edit_messages , can_delete_messages = can_delete_messages , can_invite_users = can_invite_users , can_restrict_members = can_restrict_members , can_promote_members = can_promote_members , can_pin_messages = can_pin_messages , timeout = timeout )
Promote or demote a member.
Promote or demote a member .
"""
        Promote or demote a member.

        :param chat_id: Chat ID. Can be either a numerical ID or a unique identifier in the format ``@channelname``.
            In order to get your own Telegram chat_id open a conversation with
            `@IDBot <https://telegram.me/IDBot>`_ and type ``/start`` followed by ``/getid``. Similar procedures
            also exist to get a group or channel chat_id - just Google for "Telegram get channel/group chat_id".

        :param user_id: Unique user ID.
        :param can_change_info: Pass True if the user can change channel info.
        :param can_post_messages: Pass True if the user can post messages.
        :param can_edit_messages: Pass True if the user can edit messages.
        :param can_delete_messages: Pass True if the user can delete messages.
        :param can_invite_users: Pass True if the user can invite other users to the channel/group.
        :param can_restrict_members: Pass True if the user can restrict the permissions of other users.
        :param can_promote_members: Pass True if the user can promote mebmers.
        :param can_pin_messages: Pass True if the user can pin messages.
        :param timeout: Request timeout (default: 20 seconds)
        """
self
chat_id
Union[str, int]
Chat ID. Can be either a numerical ID or a unique identifier in the format ``@channelname``.
In order to get your own Telegram chat_id open a conversation with
`@IDBot `_ and type ``/start`` followed by ``/getid``. Similar procedures
also exist to get a group or channel chat_id - just Google for "Telegram get channel/group chat_id".
Chat ID . Can be either a numerical ID or a unique identifier in the format ` ` @channelname ` ` . In order to get your own Telegram chat_id open a conversation with ` @IDBot ` _ and type ` ` / start ` ` followed by ` ` / getid ` ` . Similar procedures also exist to get a group or channel chat_id - just Google for " Telegram get channel / group chat_id " .
user_id
int
Unique user ID.
Unique user ID .
can_change_info
Optional[bool]
Pass True if the user can change channel info.
Pass True if the user can change channel info .
can_post_messages
Optional[bool]
Pass True if the user can post messages.
Pass True if the user can post messages .
can_edit_messages
Optional[bool]
Pass True if the user can edit messages.
Pass True if the user can edit messages .
can_delete_messages
Optional[bool]
Pass True if the user can delete messages.
Pass True if the user can delete messages .
can_invite_users
Optional[bool]
Pass True if the user can invite other users to the channel/group.
Pass True if the user can invite other users to the channel / group .
can_restrict_members
Optional[bool]
Pass True if the user can restrict the permissions of other users.
Pass True if the user can restrict the permissions of other users .
can_promote_members
Optional[bool]
Pass True if the user can promote mebmers.
Pass True if the user can promote mebmers .
can_pin_messages
Optional[bool]
Pass True if the user can pin messages.
Pass True if the user can pin messages .
timeout
int
Request timeout (default: 20 seconds)
Request timeout ( default : 20 seconds )