Guild Member Events¶
Note
The following classes come from the scurrypy.events.user_events module.
UserUpdateEvent
dataclass
¶
Received when a user's settings are updated.
id: int
instance-attribute
¶
ID of the user.
username: str
instance-attribute
¶
Username of the user.
discriminator: str
instance-attribute
¶
Discriminator of the user (#XXXX)
global_name: str
instance-attribute
¶
Global name of the user.
avatar: str
instance-attribute
¶
Image hash of the user's avatar.
bot: Optional[bool]
instance-attribute
¶
If the user is a bot.
system: Optional[bool]
instance-attribute
¶
If the user belongs to an OAuth2 application.
mfa_enabled: Optional[bool]
instance-attribute
¶
Whether the user has two factor enabled.
banner: Optional[str]
instance-attribute
¶
Image hash of the user's banner.
accent_color: Optional[int]
instance-attribute
¶
Color of user's banner represented as an integer.
locale: Optional[str]
instance-attribute
¶
Chosen language option of the user.
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
GuildMemberAddEvent
dataclass
¶
Bases: Event, GuildMemberModel
Received when a member joins a guild the bot is in.
Warning
Requires privileged GUILD_MEMBERS intent.
guild_id: int
instance-attribute
¶
ID of the guild.
roles: list[int]
instance-attribute
¶
List of roles registered to the guild member.
user: UserModel
instance-attribute
¶
User data associated with the guild member.
nick: str
instance-attribute
¶
Server nickname of the guild member.
avatar: str
instance-attribute
¶
Server avatar hash of the guild mmeber.
joined_at: str
instance-attribute
¶
ISO8601 timestamp of when the guild member joined server.
permissions: Optional[int]
instance-attribute
¶
Total permissions of the member in the channel, including overwrites,
returned when in the interaction object. [INT_LIMIT]
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
GuildMemberUpdateEvent
dataclass
¶
Received when a guild member is updated.
Warning
Requires privileged GUILD_MEMBERS intent.
guild_id: int
instance-attribute
¶
ID of the guild.
roles: list[int]
instance-attribute
¶
List of user's roles (their IDs).
user: UserModel
instance-attribute
¶
The User object.
avatar: str
instance-attribute
¶
Guild avatar hash.
banner: str
instance-attribute
¶
Guild banner hash.
joined_at: str
instance-attribute
¶
When the user joined the guild
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
GuildMemberRemoveEvent
dataclass
¶
Received when a member leaves or is kicked/banned from a guild the bot is in.
Warning
Requires privileged GUILD_MEMBERS intent.
guild_id: int
instance-attribute
¶
ID of the guild.
user: UserModel
instance-attribute
¶
User object of the user leaving the guild.
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