mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-09 15:27:54 +00:00
Massive refactor/update/UX improvement dump. Closes #6.
This commit is contained in:
parent
f8e92375b0
commit
72590ec92c
20 changed files with 588 additions and 512 deletions
|
|
@ -128,6 +128,14 @@ class System(namedtuple("System", ["id", "hid", "name", "description", "tag", "a
|
|||
else:
|
||||
return None
|
||||
|
||||
async def add_switch(self, conn, members: List[Member]):
|
||||
async with conn.transaction():
|
||||
switch_id = await db.add_switch(conn, self.id)
|
||||
|
||||
# TODO: batch query here
|
||||
for member in members:
|
||||
await db.add_switch_member(conn, switch_id, member.id)
|
||||
|
||||
def get_member_name_limit(self) -> int:
|
||||
"""Returns the maximum length a member's name or nickname is allowed to be in order for the member to be proxied. Depends on the system tag."""
|
||||
if self.tag:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue