mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-13 17:20:14 +00:00
Add an error when using emojis in member names or system tags. Closes #13
This commit is contained in:
parent
5930f490ce
commit
a2cbf20add
2 changed files with 7 additions and 1 deletions
|
|
@ -67,6 +67,9 @@ async def system_set(ctx: CommandContext):
|
|||
if len(value) > 32:
|
||||
return CommandError("You can't have a system tag longer than 32 characters.")
|
||||
|
||||
if re.search("<a?:\w+:\d+>", value):
|
||||
return CommandError("Due to a Discord limitation, custom emojis aren't supported. Please use a standard emoji instead.")
|
||||
|
||||
# Make sure there are no members which would make the combined length exceed 32
|
||||
members_exceeding = await db.get_members_exceeding(ctx.conn, system_id=system.id,
|
||||
length=32 - len(value) - 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue