mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-15 02:00:09 +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
|
|
@ -55,10 +55,13 @@ async def member_set(ctx: CommandContext):
|
|||
help=help.edit_member)
|
||||
|
||||
if ctx.has_next():
|
||||
value = " ".join(ctx.remaining())
|
||||
value = ctx.remaining()
|
||||
|
||||
# Sanity/validity checks and type conversions
|
||||
if prop == "name":
|
||||
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.")
|
||||
|
||||
bounds_error = utils.bounds_check_member_name(value, system.tag)
|
||||
if bounds_error:
|
||||
return CommandError(bounds_error)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue