mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-12 08:40:11 +00:00
Add basic switch model and migrate fronter command
This commit is contained in:
parent
31322f3fea
commit
4a48e43d13
4 changed files with 49 additions and 16 deletions
11
src/pluralkit/switch.py
Normal file
11
src/pluralkit/switch.py
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
from collections import namedtuple
|
||||
|
||||
from typing import List
|
||||
|
||||
from pluralkit import db
|
||||
from pluralkit.member import Member
|
||||
|
||||
|
||||
class Switch(namedtuple("Switch", ["id", "system", "timestamp", "members"])):
|
||||
async def fetch_members(self, conn) -> List[Member]:
|
||||
return await db.get_members(conn, self.members)
|
||||
Loading…
Add table
Add a link
Reference in a new issue