discord-interactions

Guild Models

class interactions.api.models.guild.GuildFeature(value)

An enumerable string-formatted class representing all of the features a guild can have.

class interactions.api.models.guild.WelcomeChannels(**kwargs)

A class object representing a welcome channel on the welcome screen.

Note

emoji_id and emoji_name are given values respectively if the welcome channel uses an emoji.

Variables
  • channel_id (int) – The ID of the welcome channel.

  • description (str) – The description of the welcome channel.

  • emoji_id (typing.Optional[int]) – The ID of the emoji of the welcome channel.

  • emoji_name (typing.Optional[str]) – The name of the emoji of the welcome channel.

class interactions.api.models.guild.WelcomeScreen(**kwargs)

A class object representing the welcome screen shown for community guilds.

Note

description is ambiguous – Discord poorly documented this. :)

We assume it’s for the welcome screen topic.

Variables
  • description (typing.Optional[str]) – The description of the welcome sceen.

  • welcome_channels (typing.List[interactions.api.models.guild.WelcomeChannels]) – A list of welcome channels of the welcome screen.

class interactions.api.models.guild.StageInstance(**kwargs)

A class object representing an instace of a stage channel in a guild.

Variables
  • id (int) – The ID of the stage.

  • guild_id (int) – The guild ID the stage is in.

  • channel_id (int) – The channel ID the stage is instantiated from.

  • topic (str) – The topic of the stage.

  • privacy_level (int) – The “privacy”/inclusive accessibility level of the stage.

  • discoverable_disabled (bool) – Whether the stage can be seen from the stage discovery.

class interactions.api.models.guild.Guild(**kwargs)

A class object representing how a guild is registered.

Note

Most of these optionals are actually declared with their value upon instantiation but are kept like this since this class object is meant to be more broad and generalized.

Variables
  • id (int) – The ID of the guild.

  • name (str) – The name of the guild.

  • icon (typing.Optional[str]) – The icon of the guild.

  • icon_hash (typing.Optional[str]) – The hashed version of the icon of the guild.

  • splash (typing.Optional[str]) – The invite splash banner of the guild.

  • discovery_splash (typing.Optional[str]) – The discovery splash banner of the guild.

  • owner (typing.Optional[bool]) – Whether the guild is owned.

  • owner_id (int) – The ID of the owner of the guild.

  • permissions (typing.Optional[str]) – The permissions of the guild.

  • region (typing.Optional[str]) – The geographical region of the guild.

  • afk_channel_id (typing.Optional[int]) – The AFK voice channel of the guild.

  • afk_timeout (int) – The timeout of the AFK voice channel of the guild.

  • widget_enabled (typing.Optional[bool]) – Whether widgets are enabled in the guild.

  • widget_channel_id (typing.Optional[int]) – The channel ID of the widget in the guild.

  • verification_level (int) – The level of user verification of the guild.

  • default_message_notifications (int) – The default message notifications setting of the guild.

  • explicit_content_filter (int) – The explicit content filter setting level of the guild.

  • roles (typing.List[interactions.api.models.role.Role]) – The list of roles in the guild.

  • emojis (typing.List[interactions.api.models.message.Emoji]) – The list of emojis from the guild.

  • features (typing.List[interactions.api.models.guild.GuildFeature]) – The list of features of the guild.

  • mfa_level (int) – The MFA level of the guild.

  • application_id (typing.Optional[int]) – The application ID of the guild.

  • system_channel_id (typing.Optional[int]) – The channel ID of the system of the guild.

  • rules_channel_id (typing.Optional[int]) – The channel ID of Discord’s defined “rules” channel of the guild.

  • joined_at (typing.Optional[datetime.datetime]) – The timestamp the member joined the guild.

  • large (typing.Optional[bool]) – Whether the guild is considered “large.”

  • unavailable (typing.Optional[bool]) – Whether the guild is unavailable to access.

  • member_count (typing.Optional[int]) – The amount of members in the guild.

  • presences (typing.Optional[typing.List[interactions.api.models.presence.PresenceUpdate]]) – The list of presences in the guild.

  • max_presences (typing.Optional[int]) – The maximum amount of presences allowed in the guild.

  • max_members (typing.Optional[int]) – The maximum amount of members allowed in the guild.

  • vanity_url_code (typing.Optional[str]) – The vanity URL of the guild.

  • description (typing.Optional[str]) – The description of the guild.

  • banner (typing.Optional[str]) – The banner of the guild.

  • premium_tier (int) – The server boost level of the guild.

  • premium_subscription_count (typing.Optional[int]) – The amount of server boosters in the guild.

  • preferred_locale (str) – The “preferred” local region of the guild.

  • public_updates_channel_id (typing.Optional[int]) – The channel ID for community updates of the guild.

  • max_video_channel_users (typing.Optional[int]) – The maximum amount of video streaming members in a channel allowed in a guild.

  • approximate_member_count (typing.Optional[int]) – The approximate amount of members in the guild.

  • approximate_presence_count (typing.Optional[int]) – The approximate amount of presences in the guild.

  • welcome_screen (typing.Optional[interactions.api.models.guild.WelcomeScreen]) – The welcome screen of the guild.

  • nsfw_level (int) – The NSFW safety filter level of the guild.

  • stage_instances (typing.Optional[interactions.api.models.guild.StageInstance]) – The stage instance of the guild.

  • stickers (typing.Optional[typing.List[interactions.api.models.message.Sticker]]) – The list of stickers from the guild.

class interactions.api.models.guild.GuildPreview(**kwargs)

A model representing the preview of a guild.

..note::

This refers to the documentation here <https://discord.com/developers/docs/resources/guild>_

Variables
  • id (int) – The ID of the guild.

  • name (str) – The name of the guild.

  • icon (typing.Optional[str]) – The icon of the guild.

  • splash (typing.Optional[str]) – The invite splash banner of the guild.

  • discovery_splash (typing.Optional[str]) – The discovery splash banner of the guild.

  • emojis (typing.List[interactions.api.models.message.Emoji]) – The list of emojis from the guild.

  • features (typing.List[interactions.api.models.guild.GuildFeature]) – The list of features of the guild.

  • approximate_member_count (int) – The approximate amount of members in the guild.

  • approximate_presence_count (int) – The approximate amount of presences in the guild.

  • description (typing.Optional[str]) – The description of the guild.

class interactions.api.models.guild.Invite(**kwargs)

The invite object.

class interactions.api.models.guild.GuildTemplate(**kwargs)

An object representing the snapshot of an existing guild.