mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-11 16:20:13 +00:00
Refactor member actions into members.py
This commit is contained in:
parent
05cf04df03
commit
cae394b4e8
7 changed files with 214 additions and 109 deletions
|
|
@ -55,3 +55,15 @@ class AccountAlreadyLinkedError(PluralKitError):
|
|||
class UnlinkingLastAccountError(PluralKitError):
|
||||
def __init__(self):
|
||||
super().__init__("This is the only account on your system, so you can't unlink it.")
|
||||
|
||||
|
||||
class MemberNameTooLongError(PluralKitError):
|
||||
def __init__(self, tag_present: bool):
|
||||
if tag_present:
|
||||
super().__init__("The maximum length of a name plus the system tag is 32 characters. Please reduce the length of the tag, or choose a shorter member name.")
|
||||
else:
|
||||
super().__init__("The maximum length of a member name is 32 characters.")
|
||||
|
||||
class InvalidColorError(PluralKitError):
|
||||
def __init__(self):
|
||||
super().__init__("Color must be a valid hex color. (eg. #ff0000)")
|
||||
Loading…
Add table
Add a link
Reference in a new issue