Added LabelTooLongError() and changed names
This commit is contained in:
@@ -21,14 +21,14 @@ async def cmd_label(app, msg):
|
||||
label = " ".join(msg.command[2:])
|
||||
|
||||
if label.lower() == "reset":
|
||||
await target.reset_label(msg.chat)
|
||||
await target.label_reset(msg.chat)
|
||||
await msg.reply_text(f"Resetting **{target.id}**'s label...", quote=should_quote(msg))
|
||||
|
||||
else:
|
||||
if len(label) > 16:
|
||||
await msg.reply_text(locale("label_too_long", "message"))
|
||||
return
|
||||
await target.set_label(msg.chat, label)
|
||||
await target.label_set(msg.chat, label)
|
||||
await msg.reply_text(f"Setting **{target.id}**'s label to **{label}**...", quote=should_quote(msg))
|
||||
|
||||
else:
|
||||
|
Reference in New Issue
Block a user