feat: check emoji in promote title
This commit is contained in:
parent
b13e8533ed
commit
69873b3c8d
3 changed files with 16 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
|||
from aiogram.exceptions import TelegramBadRequest
|
||||
from aiogram.types import Message
|
||||
from emoji import is_emoji
|
||||
|
||||
from config import config
|
||||
|
||||
|
|
@ -19,6 +20,9 @@ async def handle_promote_command(message: Message) -> None:
|
|||
if len(title) > 16:
|
||||
await message.reply('头衔太长了,咱设置不了')
|
||||
return
|
||||
if any(is_emoji(s) for s in title):
|
||||
await message.reply('你这叽里咕噜的杜叔叔也看不懂啊')
|
||||
return
|
||||
if member.status == 'creator':
|
||||
await message.reply('咱不能给群主设置头衔')
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue