Guild Models¶
Note
The following classes come from the scurrypy.models.guild module.
ReadyGuildModel
dataclass
¶
UnavailableGuildModel
dataclass
¶
Bases: DataModel
Guild info during an outage or before bot bootup.
GuildModel
dataclass
¶
Bases: DataModel
Represents a Discord guild.
id: int
instance-attribute
¶
ID of the guild.
name: str
instance-attribute
¶
Name of the guild.
icon: str
instance-attribute
¶
Image hash of the guild's icon.
splash: str
instance-attribute
¶
Image hash of the guild's splash.
owner: Optional[bool]
instance-attribute
¶
If the member is the owner.
owner_id: int
instance-attribute
¶
OD of the owner of the guild.
emojis: list[EmojiModel]
instance-attribute
¶
List of emojis registered in the guild.
roles: list[RoleModel]
instance-attribute
¶
Roles in the guild.
mfa_level: int
instance-attribute
¶
Required MFA level of the guild.
application_id: int
instance-attribute
¶
ID of the application if the guild is created by a bot.
system_channel_id: int
instance-attribute
¶
Channel ID where system messages go (e.g., welcome messages, boost events).
system_channel_flags: int
instance-attribute
¶
System channel flags.
rules_channel_id: int
instance-attribute
¶
Channel ID where rules are posted.
max_members: Optional[int]
instance-attribute
¶
Maximum member capacity for the guild.
description: str
instance-attribute
¶
Description of the guild.
banner: str
instance-attribute
¶
Image hash of the guild's banner.
preferred_locale: str
instance-attribute
¶
Preferred locale of the guild.
public_updates_channel_id: int
instance-attribute
¶
Channel ID of announcement or public updates.
approximate_member_count: int
instance-attribute
¶
Approximate number of members in the guild.
nsfw_level: int
instance-attribute
¶
NSFW level of the guild.
safety_alerts_channel_id: int
instance-attribute
¶
Channel ID for safety alerts.
to_dict
¶
Recursively turns the dataclass into a dictionary and drops empty fields.
Returns:
-
dict–serialized dataclasss
GuildFeatures
¶
NEWS = 'NEWS'
class-attribute
instance-attribute
¶
ROLE_ICONS = 'ROLE_ICONS'
class-attribute
instance-attribute
¶
ANIMATED_ICON = 'ANIMATED_ICON'
class-attribute
instance-attribute
¶
INVITE_SPLASH = 'INVITE_SPLASH'
class-attribute
instance-attribute
¶
DISCOVERABLE = 'DISCOVERABLE'
class-attribute
instance-attribute
¶
BANNER = 'BANNER'
class-attribute
instance-attribute
¶
ANIMATED_BANNER = 'ANIMATED_BANNER'
class-attribute
instance-attribute
¶
PARTNERED = 'PARTNERED'
class-attribute
instance-attribute
¶
GuildBanModel
dataclass
¶
GuildWelcomeScreenModel
dataclass
¶
Bases: DataModel
Represents a guild's welcome screen.
description: str
instance-attribute
¶
Guild description displayed.
welcome_channels: list[GuildWelcomeChannelModel]
instance-attribute
¶
Channels displayed on the welcome screen. Max 5.
to_dict
¶
Recursively turns the dataclass into a dictionary and drops empty fields.
Returns:
-
dict–serialized dataclasss
GuildWelcomeChannelModel
dataclass
¶
Bases: DataModel
Represents channels shown on a welcome screen.
channel_id: int
instance-attribute
¶
ID of the channel.
description: str
instance-attribute
¶
Description for the channel.
emoji_id: int
instance-attribute
¶
Emoji ID for the welcome screen (if custom).
emoji_name: str
instance-attribute
¶
Emoji name for the welcome screen.
to_dict
¶
Recursively turns the dataclass into a dictionary and drops empty fields.
Returns:
-
dict–serialized dataclasss
GuildOnboadingModel
dataclass
¶
Bases: DataModel
Represents a guild's onboarding flow.
guild_id: int
instance-attribute
¶
ID of the guild for onboarding.
prompts: list[OnboardingPromptModel]
instance-attribute
¶
Prompts shown during onboarding.
default_channel_ids: list[int]
instance-attribute
¶
Channel IDs members are opted into by default.
enabled: bool
instance-attribute
¶
Whether onboarding is enabled for the guild.
mode: int
instance-attribute
¶
Current mode of onboarding. See OnboardingModes.
to_dict
¶
Recursively turns the dataclass into a dictionary and drops empty fields.
Returns:
-
dict–serialized dataclasss
OnboardingPromptModel
dataclass
¶
Bases: DataModel
Represents a guild's prompt for onboarding.
id: int
instance-attribute
¶
ID of the prompt.
type: int
instance-attribute
¶
Type of prompt. See PromptTypes.
options: list[OnboardingPromptOptionModel]
instance-attribute
¶
Options available with the prompt.
title: str
instance-attribute
¶
Title of the prompt.
single_select: bool
instance-attribute
¶
Whether users are limited to selecting one option.
required: bool
instance-attribute
¶
Whether the prompt is required for completing the onboarding process.
in_onboarding: bool
instance-attribute
¶
Whether the prompt is present in the onboarding flow.
to_dict
¶
Recursively turns the dataclass into a dictionary and drops empty fields.
Returns:
-
dict–serialized dataclasss
OnboardingPromptOptionModel
dataclass
¶
Bases: DataModel
Represents a guild's prompt option for onboarding.
id: int
instance-attribute
¶
ID of the prompt option.
channel_ids: list[int]
instance-attribute
¶
Channel IDs a member is added to when selected.
role_ids: list[int]
instance-attribute
¶
Role IDs a member is given when selected.
emoji: Optional[EmojiModel]
instance-attribute
¶
Emoji for the option.
emoji_id: Optional[int]
instance-attribute
¶
ID for the emoji of the option.
emoji_name: Optional[str]
instance-attribute
¶
Name for the emoji of the option.
emoji_animated: Optional[bool]
instance-attribute
¶
Whether the emoji of the option is animated.
title: str
instance-attribute
¶
Title of the option.
description: str
instance-attribute
¶
Description of the option.
to_dict
¶
Recursively turns the dataclass into a dictionary and drops empty fields.
Returns:
-
dict–serialized dataclasss