promote_chat_member#
-
template<class Connector>
api_result<boolean_t, Connector&&> promote_chat_member(Connector &&connector, promote_chat_member_args_t args)#
-
template<class Connector>
api_result<boolean_t, Connector&&> call(Connector &&connector, promote_chat_member_args_t args)# connector
is any object satisfying connector concept.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.
-
struct promote_chat_member_args_t#
Arguments that should be passed to
promote_chat_member()
.Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Unique identifier of the target user
-
optional_t<boolean_t> is_anonymous#
Pass True, if the administrator’s presence in the chat is hidden
-
optional_t<boolean_t> can_change_info#
Pass True, if the administrator can change chat title, photo and other settings
-
optional_t<boolean_t> can_post_messages#
Pass True, if the administrator can create channel posts, channels only
-
optional_t<boolean_t> can_edit_messages#
Pass True, if the administrator can edit messages of other users and can pin messages, channels only
-
optional_t<boolean_t> can_delete_messages#
Pass True, if the administrator can delete messages of other users
-
optional_t<boolean_t> can_invite_users#
Pass True, if the administrator can invite new users to the chat
-
optional_t<boolean_t> can_restrict_members#
Pass True, if the administrator can restrict, ban or unban chat members
-
optional_t<boolean_t> can_pin_messages#
Pass True, if the administrator can pin messages, supergroups only
-
optional_t<boolean_t> can_promote_members#
Pass True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)
-
optional_t<boolean_t> is_anonymous#