promoteToModerator method
Promotes a user to moderator with common moderation permissions.
This is a convenience method that promotes the specified user 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.promoteToModerator(123456789);
Returns True on success.
Implementation
Future<bool> promoteToModerator(int userId) async {
return promoteChatMember(
userId,
canManageChat: true,
canDeleteMessages: true,
canRestrictMembers: true,
canManageVideoChats: true,
canInviteUsers: true,
canPinMessages: true,
canManageTopics: true,
);
}