Invite Events¶
Note
The following classes come from the scurrypy.events.invite_events module.
InviteCreateEvent
dataclass
¶
Received when an invite is created.
channel_id: int
instance-attribute
¶
Channel ID in which the invite belongs.
code: str
instance-attribute
¶
Invite code (unique ID).
guild_id: Optional[int]
instance-attribute
¶
Guild ID in which the invite belongs.
inviter: Optional[UserModel]
instance-attribute
¶
User who created invite.
uses: int
instance-attribute
¶
Number of times this invite was used.
max_uses: int
instance-attribute
¶
Max number of times this invite can be used.
max_age: int
instance-attribute
¶
Duration (in seconds) after which this invite expires.
temporary: bool
instance-attribute
¶
Whether this invite only grants temporary membership.
created_at: str
instance-attribute
¶
ISO8601 timestamp for when this invite was created.
name: str
instance-attribute
¶
Dispatch name of event.
raw: dict
instance-attribute
¶
Event's raw JSON payload. NOT A DATACLASS.
to_dict
¶
Recursively turns the dataclass into a dictionary and drops empty fields.
Returns:
-
dict–serialized dataclasss
InviteDeleteEvent
dataclass
¶
Received when an invite is deleted.
channel_id: int
instance-attribute
¶
Channel ID in which the invite belongs.
guild_id: Optional[int]
instance-attribute
¶
Guild ID in which the invite belongs.
code: str
instance-attribute
¶
Unique invite code.
name: str
instance-attribute
¶
Dispatch name of event.
raw: dict
instance-attribute
¶
Event's raw JSON payload. NOT A DATACLASS.
to_dict
¶
Recursively turns the dataclass into a dictionary and drops empty fields.
Returns:
-
dict–serialized dataclasss