diff --git a/aiogram/types/chat.py b/aiogram/types/chat.py index 900bb5a8..81e0ac1f 100644 --- a/aiogram/types/chat.py +++ b/aiogram/types/chat.py @@ -309,6 +309,20 @@ class Chat(base.TelegramObject): """ return await self.bot.set_chat_permissions(self.id, permissions=permissions) + async def set_administrator_custom_title(self, user_id: base.Integer, custom_title: base.String) -> base.Boolean: + """ + Use this method to set a custom title for an administrator in a supergroup promoted by the bot. + + Returns True on success. + + Source: https://core.telegram.org/bots/api#setchatadministratorcustomtitle + + :param user_id: Unique identifier of the target user + :param custom_title: New custom title for the administrator; 0-16 characters, emoji are not allowed + :return: True on success. + """ + return await self.bot.set_chat_administrator_custom_title(chat_id=self.id, user_id=user_id, custom_title=custom_title) + async def pin_message(self, message_id: base.Integer, disable_notification: base.Boolean = False) -> base.Boolean: """ Use this method to pin a message in a supergroup.