promoteAuthorToModerator method

Future<bool> promoteAuthorToModerator()

Promotes the author to moderator with common moderation permissions.

This is a convenience method that promotes the message author to administrator with permissions commonly needed for moderation: managing chat, deleting messages, restricting members, managing video chats, inviting users, and pinning messages.

Example:

await ctx.promoteAuthorToModerator();

Returns True on success.

Implementation

Future<bool> promoteAuthorToModerator() async {
  return promoteAuthor(
    canManageChat: true,
    canDeleteMessages: true,
    canRestrictMembers: true,
    canManageVideoChats: true,
    canInviteUsers: true,
    canPinMessages: true,
    canManageTopics: true,
  );
}