LabelSettingError added
This commit is contained in:
@@ -2,8 +2,8 @@ from app import app
|
||||
from pyrogram import filters
|
||||
from pyrogram.types import Message
|
||||
from pyrogram.client import Client
|
||||
from modules.utils import locale, should_quote, find_user
|
||||
from classes.holo_user import HoloUser, LabelTooLongError
|
||||
from modules.utils import configGet, locale, should_quote, find_user
|
||||
from classes.holo_user import HoloUser, LabelTooLongError, LabelSettingError
|
||||
from modules import custom_filters
|
||||
|
||||
# Label command ================================================================================================================
|
||||
@@ -32,6 +32,9 @@ async def cmd_label(app: Client, msg: Message):
|
||||
except LabelTooLongError:
|
||||
await msg.reply_text(locale("label_too_long", "message"))
|
||||
return
|
||||
except LabelSettingError as exp:
|
||||
await app.send_message(configGet("admin", "groups"), exp.__str__(), disable_notification=True)
|
||||
return
|
||||
await msg.reply_text(f"Setting **{target.id}**'s label to **{label}**...", quote=should_quote(msg))
|
||||
|
||||
else:
|
||||
|
Reference in New Issue
Block a user