promoteToFullAdmin method

Future<bool> promoteToFullAdmin(
  1. int userId
)

Promotes a user to full administrator with all permissions.

This is a convenience method that promotes the specified user to administrator with all available permissions enabled.

Example:

await ctx.promoteToFullAdmin(123456789);

Returns True on success.

Implementation

Future<bool> promoteToFullAdmin(int userId) async {
  return promoteChatMember(
    userId,
    canManageChat: true,
    canPostMessages: true,
    canEditMessages: true,
    canDeleteMessages: true,
    canManageVideoChats: true,
    canRestrictMembers: true,
    canPromoteMembers: true,
    canChangeInfo: true,
    canInviteUsers: true,
    canPinMessages: true,
    canManageTopics: true,
    canPostStories: true,
    canEditStories: true,
    canDeleteStories: true,
  );
}