-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathgroup.py
More file actions
39 lines (31 loc) · 725 Bytes
/
group.py
File metadata and controls
39 lines (31 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from typing import List, Optional, Literal
from dataclasses import dataclass
@dataclass
class CreateGroup:
subject: str
participants: List[str]
description: Optional[str] = None
@dataclass
class GroupPicture:
image: str
@dataclass
class GroupSubject:
subject: str
@dataclass
class GroupDescription:
description: str
@dataclass
class GroupInvite:
groupJid: str
description: str
numbers: List[str]
@dataclass
class UpdateParticipant:
action: Literal["add", "remove", "promote", "demote"]
participants: List[str]
@dataclass
class UpdateSetting:
action: Literal["announcement", "not_announcement", "locked", "unlocked"]
@dataclass
class ToggleEphemeral:
expiration: int