Guild

Inherits: DiscordEntity < Reference < Object

Description

Represents a guild on Discord also known as a server.

Properties

type name
String name
String description
int owner_id
Guild.Member owner
String icon_hash
String splash_hash
String discovery_splash_hash
int afk_channel_id
Guild.GuildVoiceChannel afk_channel
int afk_timeout
bool widget_enabled
int widget_channel_id
Channel widget_channel
int verification_level
int default_message_notifications
int explicit_content_filter
Array roles
Array emojis
PoolIntArray features
int mfa_level
int application_id
int system_channel_id
Guild.GuildTextChannel system_channel
BitFlag system_channel_flags
int rules_channel_id
Guild.GuildTextChannel rules_channel
bool is_large
bool unavailable
int member_count
Dictionary voice_states
Array members
Array channels_ids
Array threads_ids
Array channels
int max_presences
int max_members
String vanity_url_code
String banner_hash
int premium_tier
int premium_subscription_count
String preferred_locale
int public_updates_channel_id
Guild.GuildTextChannel public_updates_channel
int max_video_channel_users
WelcomeScreen welcome_screen
int nsfw_level
Array threads
Array stage_instances
Array stickers
Array scheduled_events
bool progress_bar_enabled

Methods

return type signature
bool has_feature ( int feature )
Channel get_channel ( int channel_id )
Array get_channels ( bool sort=false )
Guild.GuildVoiceChannel get_afk_channel ( )
Channel get_widget_channel ( )
Guild.GuildTextChannel get_system_channel ( )
Guild.GuildTextChannel get_rules_channel ( )
Guild.GuildTextChannel get_public_updates_channel ( )
Guild.Member get_member ( int member_id )
Array get_members ( )
Guild.Member get_owner ( )
Array get_roles ( )
Guild.Role get_role ( int role_id )
Guild.Role get_default_role ( )
Array get_emojis ( )
Guild.GuildEmoji get_emoji ( int emoji_id )
Array get_threads ( )
Guild.ThreadChannel get_thread ( int thread_id )
Array get_stage_instances ( )
Guild.StageInstance get_stage_instance ( int stage_id )
Array get_stickers ( )
Object get_sticker ( int sticker_id )
Array get_scheduled_events ( )
Guild.GuildScheduledEvent get_scheduled_event ( int event_id )
String get_icon_url ( String format="png", int size=128 )
Texture get_icon ( String format="png", int size=128 ) coroutine
GuildEditAction edit ( )
bool delete ( ) coroutine
Guild fetch ( ) coroutine
Array fetch_channels ( ) coroutine
ChannelCategoryCreateAction create_category ( )
TextChannelCreateAction create_text_channel ( )
VoiceChannelCreateAction create_voice_channel ( )
ChannelEditPositionsAction edit_channel_positions ( )
Guild.Member fetch_member ( int member_id ) coroutine
Array fetch_members ( int limit=1, int after=0 ) coroutine
Array search_members ( String query, int limit=1 ) coroutine
Array add_member ( int user_id, String access_token ) coroutine
CurrentMemberEditAction edit_current_member ( )
Array fetch_bans ( ) coroutine
GuildBan fetch_ban ( int user_id ) coroutine
Array fetch_roles ( ) coroutine
RoleCreateAction create_role ( )
Array edit_role_positions ( ) coroutine
int fetch_prune_count ( int days=7, PoolStringArray role_ids=[ ] ) coroutine
int begin_prune ( int days=7, bool return_count=true, PoolStringArray role_ids=[ ] ) coroutine
Array fetch_voice_regions ( ) coroutine
Array fetch_invites ( ) coroutine
Guild.Invite fetch_vanity_url ( ) coroutine
Texture fetch_widget_image ( String style="shield" ) coroutine
bool has_member ( int member_id )
bool has_icon ( )

Constants

  • Dictionary Features

    • ANIMATED_ICON = 0

    • BANNER = 1

    • COMMERCE = 2

    • COMMUNITY = 3

    • DISCOVERABLE = 4

    • FEATURABLE = 5

    • INVITE_SPLASH = 6

    • MEMBER_VERIFICATION_GATE_ENABLED = 7

    • MONETIZATION_ENABLED = 8

    • MORE_STICKERS = 9

    • NEWS = 10

    • PARTNERED = 11

    • PREVIEW_ENABLED = 12

    • PRIVATE_THREADS = 13

    • ROLE_ICONS = 14

    • SEVEN_DAY_THREAD_ARCHIVE = 15

    • THREE_DAY_THREAD_ARCHIVE = 16

    • TICKETED_EVENTS_ENABLED = 17

    • VANITY_URL = 18

    • VERIFIED = 19

    • VIP_REGIONS = 20

    • WELCOME_SCREEN_ENABLED = 21

    Guild features.


  • Dictionary ExplicitContentFilterLevel

    • DISABLED = 0

    • MEMBERS_WITHOUT_ROLES = 1

    • ALL_MEMBERS = 2

    Explicit content filter options.


  • Dictionary VerificationLevel

    • NONE = 0

    • LOW = 1

    • MEDIUM = 2

    • HIGH = 3

    • VERY_HIGH = 4

    Verification level options.


  • Dictionary MFALevel

    • NONE = 0

    • ELEVATED = 1

    MFA level options.


  • Dictionary SystemChannelFlags

    • SUPPRESS_JOIN_NOTIFICATIONS = 1

    • SUPPRESS_PREMIUM_SUBSCRIPTIONS = 2

    • SUPPRESS_GUILD_REMINDER_NOTIFICATIONS = 4

    System channel flags.


  • Dictionary PremiumTier

    • NONE = 0

    • TIER_1 = 1

    • TIER_2 = 2

    • TIER_3 = 3

    Nitro boost tiers.


  • Dictionary NSFWLevel

    • DEFAULT = 0

    • EXPLICIT = 1

    • SAFE = 2

    • AGE_RESTRICTED = 3

    NSFW level options.


  • Dictionary MessageNotificationLevel

    • ALL_MESSAGES = 0

    • ONLY_MENTIONS = 1

    Notification level options.

Property Descriptions

  • String name

    Name of the guild.


  • String description

    Description of the guild.


  • int owner_id

    The guild's owner id.


  • Guild.Member owner

    method
    Getter get_owner()

    Owner of the guild.


  • String icon_hash

    Icon hash string. Empty if the guild has no icon.


  • String splash_hash

    Invite splash screen hash string. Empty if the guild has no Invite splash screen.


  • String discovery_splash_hash

    Discovery splash screen hash string. Empty if the guild has no Discovery splash screen.


  • int afk_channel_id

    AFK voice channel id.


  • Guild.GuildVoiceChannel afk_channel

    method
    Getter get_afk_channel()

    AFK voice channel.


  • int afk_timeout

    Voice inactivity timeout in seconds.


  • bool widget_enabled

    true if the server widget is enabled.


  • int widget_channel_id

    The channel id that the widget will generate an invite to, or 0 if set to no invite.


  • Channel widget_channel

    method
    Getter get_widget_channel()

    Reference to the widget channel.


  • int verification_level

    The guild's VerificationLevel.


  • int default_message_notifications

    The guild's default MessageNotificationLevel.


  • int explicit_content_filter

    The guild's ExplicitContentFilterLevel.


  • Array roles

    method
    Getter get_roles()

    Roles in the guild.


  • Array emojis

    method
    Getter get_emojis()

    Custom emojis in the guild.


  • PoolIntArray features

    Enabled guild Features.


  • int mfa_level

    The guild's MFALevel.


  • int application_id

    Application id of the guild creator if it is bot-created.


  • int system_channel_id

    System channel id.


  • Guild.GuildTextChannel system_channel

    method
    Getter get_system_channel()

    System channel.


  • BitFlag system_channel_flags

    The guild's SystemChannelFlags.


  • int rules_channel_id

    Rules channel id.


  • Guild.GuildTextChannel rules_channel

    method
    Getter get_rules_channel()

    Rules channel.


  • bool is_large

    true if this is considered a large guild.


  • bool unavailable

    true if this guild is unavailable due to an outage.


  • int member_count

    Total number of members in this guild.


  • Dictionary voice_states

    States of members currently in voice channels.


  • Array members

    method
    Getter get_members()

    Members of the guild. This does not include all members if the guild is large or the members cache is disabled.
    Use member_count to get the total number of members.
    Use get_member to get a member by id from cache.
    Use fetch_member to get a member by id.
    Use fetch_members to get a chunk of the members list.


  • Array channels_ids

    List of channel ids in the guild.


  • Array threads_ids

    List of thread ids in the guild.


  • Array channels

    method
    Getter get_channels()

    Channels in the guild.


  • int max_presences

    The maximum number of presences for the guild, only set on the largest of guilds.


  • int max_members

    The maximum number of members for the guild.


  • String vanity_url_code

    The vanity url code for the guild. Empty if the guild has no vanity url.


  • String banner_hash

    Banner hash string. Empty if the guild has no banner.


  • int premium_tier

    The guilds's PremiumTier (Server Boost level).


  • int premium_subscription_count

    The number of boosts this guild currently has.


  • String preferred_locale

    The preferred locale of a Community guild, defaults to en-US.


  • int public_updates_channel_id

    The id of community updates channel.


  • Guild.GuildTextChannel public_updates_channel

    method
    Getter get_public_updates_channel()

    Community updates channel.


  • int max_video_channel_users

    The maximum amount of users in a video channel.


  • WelcomeScreen welcome_screen

    There is currently no description for this property.


  • int nsfw_level

    The guild's NSFWFilterLevel.


  • Array threads

    method
    Getter get_threads()

    All active threads in the guild that current user has permission to view.


  • Array stage_instances

    method
    Getter get_stage_instances()

    Stage instances in the guild.


  • Array stickers

    method
    Getter get_stickers()

    Custom stickers in the guild.


  • Array scheduled_events

    method
    Getter get_scheduled_events()

    The scheduled events in the guild.


  • bool progress_bar_enabled

    Whether the guild has the boost progress bar enabled

Method Descriptions

  • bool has_feature ( int feature )

    Checks whether the guild has the given feature.


  • Channel get_channel ( int channel_id )

    Gets a channel by channel_id that is part of the guild.


  • Array get_channels ( bool sort=false )

    channels getter. sort can be true to sort the channels by position.


  • Guild.GuildVoiceChannel get_afk_channel ( )

    afk_channel getter.


  • Channel get_widget_channel ( )

    widget_channel getter.


  • Guild.GuildTextChannel get_system_channel ( )

    system_channel getter.


  • Guild.GuildTextChannel get_rules_channel ( )

    rules_channel getter.


  • Guild.GuildTextChannel get_public_updates_channel ( )

    public_updates_channel getter.


  • Guild.Member get_member ( int member_id )

    Gets a member by member_id from cache.


  • Array get_members ( )

    members getter (retrieves from cache).


  • Guild.Member get_owner ( )

    owner getter.


  • Array get_roles ( )

    roles getter.


  • Guild.Role get_role ( int role_id )

    Gets a role by role_id.


  • Guild.Role get_default_role ( )

    Gets default role (@everyone).


  • Array get_emojis ( )

    emojis getter.


  • Guild.GuildEmoji get_emoji ( int emoji_id )

    Get emoji by emoji_id.


  • Array get_threads ( )

    threads getter.


  • Guild.ThreadChannel get_thread ( int thread_id )

    Gets thread by thread_id.


  • Array get_stage_instances ( )

    stage_instances getter.


  • Guild.StageInstance get_stage_instance ( int stage_id )

    Gets stage instance by stage_id.


  • Array get_stickers ( )

    stickers getter.


  • Object get_sticker ( int sticker_id )

    Gets sticker by sticker_id.


  • Array get_scheduled_events ( )

    scheduled_events getter.


  • Guild.GuildScheduledEvent get_scheduled_event ( int event_id )

    Gets scheduled event by event_id.


  • String get_icon_url ( String format="png", int size=128 )

    Gets the guild's icon URL or an empty string if the guild has no icon.
    format can be jpg, jpeg, png, webp or gif, defaults to png.
    size is the image size and can be any power of two between 16 and 4096 (inclusive), defaults to 128.


  • Texture get_icon ( String format="png", int size=128 ) coroutine

    Downloads the icon of the guild.


  • GuildEditAction edit ( )

    Modify a guild's settings. Requires the MANAGE_GUILD permission.


  • bool delete ( ) coroutine

    Deletes the guild permanently. User must be the owner. Returns true on success.


  • Guild fetch ( ) coroutine

    Fethes the guild.


  • Array fetch_channels ( ) coroutine

    Fetches the guild channels from Discord API.


  • ChannelCategoryCreateAction create_category ( )

    Creates a new channel category in the guild.


  • TextChannelCreateAction create_text_channel ( )

    Creates a new text channel in the guild.


  • VoiceChannelCreateAction create_voice_channel ( )

    Creates a new text channel in the guild.


  • ChannelEditPositionsAction edit_channel_positions ( )

    Edits channel positions.


  • Guild.Member fetch_member ( int member_id ) coroutine

    Fetches a guild member by member_id from Discord API.


  • Array fetch_members ( int limit=1, int after=0 ) coroutine

    Fetches guild members from Discord API. limit is the maximum number of members to fetch with a maximum of 1000. after is the id of the member to start fetching after.


  • Array search_members ( String query, int limit=1 ) coroutine

    Searches for guild members whose name starts with query. limit is the maximum number of members to fetch with a maximum of 1000.


  • Array add_member ( int user_id, String access_token ) coroutine

    Adds a member to the guild. Requires a valid oauth2 access token for the user with the guilds.join scope. Returns an array where the first element is a boolean of whether the member was added and the second element is the member object.


  • CurrentMemberEditAction edit_current_member ( )

    Edits the current member in the guild.


  • Array fetch_bans ( ) coroutine

    Fetches the ban list of the guild. Returns an array of GuildBan objects.


  • GuildBan fetch_ban ( int user_id ) coroutine

    Fetches the ban of a user from the guild. Returns a GuildBan object.


  • Array fetch_roles ( ) coroutine

    Fetches the roles of the guild.


  • RoleCreateAction create_role ( )

    Creates a role in the guild.


  • Array edit_role_positions ( ) coroutine

    Edits role positions in the guild.


  • int fetch_prune_count ( int days=7, PoolStringArray role_ids=[ ] ) coroutine

    Fetches the prune count which indicates the number of members that would be removed by a prune operation. Requires the KICK_MEMBERS permission.


  • int begin_prune ( int days=7, bool return_count=true, PoolStringArray role_ids=[ ] ) coroutine

    Begin pruning the guild. Requires the KICK_MEMBERS permission. For large guilds it's recommended to set the return_count option to false. Use role_ids to include members who have a subset of the roles specified. Returns the number of members that would be removed if return_count is true else -1.


  • Array fetch_voice_regions ( ) coroutine

    Fetches the voice regions of the guild. Returns an array of DiscordVoiceRegion objects of VIP servers when the guild is VIP-enabled.


  • Array fetch_invites ( ) coroutine

    Fetches the guild invites. Requires the MANAGE_GUILD permission. Returns an array of Invite objects.


  • Guild.Invite fetch_vanity_url ( ) coroutine

    Returns a partial invite object for guilds with that feature enabled. Requires the MANAGE_GUILD permission.


  • Texture fetch_widget_image ( String style="shield" ) coroutine

    Fetches the guild's widget image. Use style to set the style of the widget image returned.

    Widget style options:

    • shield: shield style widget with Discord icon and guild members online count.
    • banner1: large image with guild icon, name and online count. "POWERED BY DISCORD" as the footer of the widget.
    • banner2: smaller widget style with guild icon, name and online count. Split on the right with Discord logo.
    • banner3: large image with guild icon, name and online count. In the footer, Discord logo on the left and "Chat Now" on the right.
    • banner4: large Discord logo at the top of the widget. Guild icon, name and online count in the middle portion of the widget and a "JOIN MY SERVER" button at the bottom.

  • bool has_member ( int member_id )

    Checks if a member with the given member_id is inside the guild members cache.


  • bool has_icon ( )

    Checks if the guild has an icon.


Sub Classes


Member

Inherits: MentionableEntity < DiscordEntity < Reference < Object

Description

Represents a member of a guild.

Properties

type name
User user
String nickname
String avatar_hash
int guild_id
Guild guild
Array roles_ids
Array roles
Presence presence
int join_date
int premium_since
bool is_deafened
bool is_muted
bool pending

Methods

return type signature
Guild get_guild ( )
String get_nickname_mention ( )
String get_nickname ( )
String get_avatar_hash ( )
Array get_roles ( )
User get_user ( )
Presence get_presence ( )
Guild.VoiceState get_partial_voice_state ( )
Guild.VoiceState get_voice_state ( )
BitFlag get_permissions ( )
BitFlag permissions_in ( int channel_id )
bool is_owner ( )
bool has_role ( int role_id )
GuildMemberEditAction edit ( )
bool assign_role ( int role_id ) coroutine
bool revoke_role ( int role_id ) coroutine
bool kick ( ) coroutine
bool ban ( ) coroutine

Property Descriptions

  • User user

    method
    Getter get_user()

    The user this guild member represents.


  • String nickname

    method
    Getter get_nickname()

    The member's nickname. Equals to user.username if no nickname is set.


  • String avatar_hash

    method
    Getter get_avatar_hash()

    the avatar hash of the member in the guild. Equals to user.avatar_hash if the member has no avatar set on the guild.


  • int guild_id

    Guild id of the member.


  • Guild guild

    method
    Getter get_guild()

    Guild id of the member. The guild this member is in.


  • Array roles_ids

    Assigned role ids of the member.


  • Array roles

    method
    Getter get_roles()

    Assigned roles of the member.


  • Presence presence

    method
    Getter get_presence()

    The current presence state of the member.


  • int join_date

    When the member joined the guild in unix timestamp (seconds).


  • int premium_since

    When the member started boosting the guild in unix timestamp (seconds).


  • bool is_deafened

    Whether the user is deafened in voice channels.


  • bool is_muted

    Whether the user is muted in voice channels.


  • bool pending

    Whether the user has not yet passed the guild's Membership Screening Requirements.

Method Descriptions

  • Guild get_guild ( )

    guild getter.


  • deprecated String get_nickname_mention ( )

    Deprecated. will be removed in the future.


  • String get_nickname ( )

    nickname getter.


  • String get_avatar_hash ( )

    avatar_hash getter.


  • Array get_roles ( )

    roles getter.


  • User get_user ( )

    user getter.


  • Presence get_presence ( )

    presence getter.


  • Guild.VoiceState get_partial_voice_state ( )

    Gets a partial VoiceState object for the member. Only contains is_deafened and is_muted properties.


  • Guild.VoiceState get_voice_state ( )

    Gets the member's voice state. If the member is not in a voice channel, returns a partial VoiceState object. See get_partial_voice_state().


  • BitFlag get_permissions ( )

    Gets the member's permissions.


  • BitFlag permissions_in ( int channel_id )

    Gets the member's permissions in a specific channel.


  • bool is_owner ( )

    Checks if the member is the guild owner.


  • bool has_role ( int role_id )

    Checks if the member has the given role_id.


  • GuildMemberEditAction edit ( )

    Modify attributes of a guild member.


  • bool assign_role ( int role_id ) coroutine

    Assigns a role to the member. Requires the MANAGE_ROLES permission. Returns true on success.


  • bool revoke_role ( int role_id ) coroutine

    Revokes a role from the member. Requires the MANAGE_ROLES permission. Returns true on success.


  • bool kick ( ) coroutine

    Kicks the member from the guild. Requires the KICK_MEMBERS permission. Returns true on success.


  • bool ban ( ) coroutine

    Bans the member from the guild. Requires the BAN_MEMBERS permission. Returns true on success.



Widget

Inherits: Reference < Object

Properties

type name
bool enabled
int channel_id

Property Descriptions

  • bool enabled

    There is currently no description for this property.


  • int channel_id

    There is currently no description for this property.


ChannelCategory

Inherits: Channel < MentionableEntity < DiscordEntity < Reference < Object

Description

Represents a category channel on a guild. Holds a list of guild channels.

Properties

type name
String name
int guild_id
Guild guild
int position
Dictionary overwrites

Methods

return type signature
Guild get_guild ( )
ChannelCategoryEditAction edit ( )

Property Descriptions

  • String name

    Channel name.


  • int guild_id

    Guild id of the channel.


  • Guild guild

    method
    Getter get_guild()

    The Guild the channel is in.


  • int position

    The channel position.


  • Dictionary overwrites

    Explicit permission overwrites for members and roles.

Method Descriptions


BaseGuildTextChannel

Inherits: TextChannel < Channel < MentionableEntity < DiscordEntity < Reference < Object

Inherited By: Guild.GuildTextChannel, Guild.ThreadChannel

Description

Abstract base class for guild text channel.

Properties

type name
String name
int guild_id
Guild guild
int position
int rate_limit_per_user

Methods

return type signature
Guild get_guild ( )

Property Descriptions

  • String name

    Channel name.


  • int guild_id

    Guild id of the channel.


  • Guild guild

    method
    Getter get_guild()

    The Guild the channel is in.


  • int position

    The channel position.


  • int rate_limit_per_user

    Amount of seconds a user has to wait before sending another message; bots, as well as users with the permission MANAGE_MESSAGES orMANAGE_CHANNELS` are unaffected.

Method Descriptions

  • Guild get_guild ( )

    guild getter.



GuildTextChannel

Inherits: Guild.BaseGuildTextChannel < TextChannel < Channel < MentionableEntity < DiscordEntity < Reference < Object

Inherited By: Guild.GuildNewsChannel

Description

Represents a guild text channel.

Properties

type name
String topic
int parent_id
Guild.ChannelCategory parent
Dictionary overwrites
bool nsfw
int auto_archive_duration

Methods

return type signature
bool has_parent ( )
Guild.ChannelCategory get_parent ( )
TextChannelEditAction edit ( )

Property Descriptions

  • String topic

    Channel topic.


  • int parent_id

    The parent category channel id. 0 if the channel is not in a category.


  • Guild.ChannelCategory parent

    method
    Getter get_parent()

    The parent category channel. null if the channel is not in a category.


  • Dictionary overwrites

    Explicit permission overwrites for members and roles.


  • bool nsfw

    Whether the channel is nsfw.


  • int auto_archive_duration

    The default auto archive duration for newly created threads in this channel.

Method Descriptions


GuildNewsChannel

Inherits: Guild.GuildTextChannel < Guild.BaseGuildTextChannel < TextChannel < Channel < MentionableEntity < DiscordEntity < Reference < Object

Description

Represents a guild news channel.


ThreadChannel

Inherits: Guild.BaseGuildTextChannel < TextChannel < Channel < MentionableEntity < DiscordEntity < Reference < Object

Description

Represents a thread channel.

Properties

type name
int owner_id
Guild.Member owner
int parent_id
Guild.GuildTextChannel parent
int message_count
int member_count
Guild.ThreadMetaData metadata

Methods

return type signature
Guild.Member get_owner ( )
Guild.GuildTextChannel get_parent ( )

Property Descriptions

  • int owner_id

    The owner id of the thread.


  • Guild.Member owner

    method
    Getter get_owner()

    The owner of the thread.


  • int parent_id

    The guild text channel id the thread was created in.


  • Guild.GuildTextChannel parent

    method
    Getter get_parent()

    The guild text channel the thread was created in.


  • int message_count

    An approximate count of messages in a thread. If the thread was created before July 1, 2022, it stops counting at 50.


  • int member_count

    An approximate count of users in a thread, stops counting at 50.


  • Guild.ThreadMetaData metadata

    Thread metadata.

Method Descriptions


ThreadMetaData

Inherits: Reference < Object

Description

Contains a number of thread-specific channel data.

Properties

type name
bool archived
int auto_archive_duration
int archive_timestamp
bool locked
bool invitable
int create_timestamp

Methods

return type signature
Guild.ThreadMetaData clone ( )

Property Descriptions

  • bool archived

    Whether the thread is archived


  • int auto_archive_duration

    The duration in minutes to automatically archive the thread after the last activity.


  • int archive_timestamp

    Unix timestamp when the thread's archive status was last changed, used for calculating recent activity.


  • bool locked

    Whether the thread is locked; when a thread is locked, only users with MANAGE_THREADS can unarchive it.


  • bool invitable

    Whether non-moderators can add other non-moderators to a thread; only available on private threads


  • int create_timestamp

    Unix timestamp when the thread was created; only available for threads created after January 9, 2022.

Method Descriptions


GuildStoreChannel

Inherits: Channel < MentionableEntity < DiscordEntity < Reference < Object

Description

Represents a guild store channel.

Properties

type name
String name
int guild_id
Guild guild
int position
int parent_id
Guild.ChannelCategory parent
Dictionary overwrites

Methods

return type signature
Guild get_guild ( )
Guild.ChannelCategory get_parent ( )

Property Descriptions

  • String name

    Channel name.


  • int guild_id

    Guild id of the channel.


  • Guild guild

    method
    Getter get_guild()

    The Guild the channel is in.


  • int position

    Channel position.


  • int parent_id

    The parent category channel id. 0 if the channel is not in a category.


  • Guild.ChannelCategory parent

    method
    Getter get_parent()

    The parent category channel. null if the channel is not in a category.


  • Dictionary overwrites

    Explicit permission overwrites for members and roles.

Method Descriptions


BaseGuildVoiceChannel

Inherits: VoiceChannel < Channel < MentionableEntity < DiscordEntity < Reference < Object

Inherited By: Guild.GuildVoiceChannel, Guild.StageChannel

Description

Abstract base class for voice guild channels.

Properties

type name
String name
int guild_id
Guild guild
int position
int parent_id
Guild.ChannelCategory parent
Array overwrites

Methods

return type signature
Guild get_guild ( )
Guild.ChannelCategory get_parent ( )
VoiceChannelEditAction edit ( )

Property Descriptions

  • String name

    Channel name.


  • int guild_id

    Guild id of the channel.


  • Guild guild

    method
    Getter get_guild()

    The Guild the channel is in.


  • int position

    Channel position.


  • int parent_id

    The parent category channel id. 0 if the channel is not in a category.


  • Guild.ChannelCategory parent

    method
    Getter get_parent()

    The parent category channel. null if the channel is not in a category.


  • Array overwrites

    Explicit permission overwrites for members and roles.

Method Descriptions


GuildVoiceChannel

Inherits: Guild.BaseGuildVoiceChannel < VoiceChannel < Channel < MentionableEntity < DiscordEntity < Reference < Object

Description

Represents a guild voice channel.

Properties

type name
int user_limit
int video_quality
Guild.GuildVoiceText text_channel

Property Descriptions

  • int user_limit

    The user limit of the voice channel, 0 if unlimited.


  • int video_quality

    The camera video quality mode of the voice channel, VoiceChannel.VideoQualityModes.AUTO when not present.


  • Guild.GuildVoiceText text_channel

    Reference to the textual chat in the voice channel.


GuildVoiceText

Inherits: TextChannel < Channel < MentionableEntity < DiscordEntity < Reference < Object

Description

Represents the textual chat in a guild voice channel. Unlike a guild text channel this does not accept threads or message pinning.

Properties

type name
Guild.GuildVoiceChannel parent

Methods

return type signature
Guild.GuildVoiceChannel get_parent ( )

Property Descriptions

Method Descriptions


StageChannel

Inherits: Guild.BaseGuildVoiceChannel < VoiceChannel < Channel < MentionableEntity < DiscordEntity < Reference < Object

Description

Represents a stage voice channel.

Properties

type name
String topic
Guild.StageInstance instance

Property Descriptions


StageInstance

Inherits: DiscordEntity < Reference < Object

Description

Holds information about a live stage.

Properties

type name
int guild_id
Guild guild
int channel_id
Guild.StageChannel channel
String topic
int privacy_level
bool discoverable

Methods

return type signature
Guild get_guild ( )
Guild.StageChannel get_channel ( )

Constants

  • Dictionary PrivacyLevel

    • PUBLIC = 0

    • GUILD_ONLY = 1

    Stage instance privacy level options.

Property Descriptions

  • int guild_id

    Guild id of the stage instance.


  • Guild guild

    method
    Getter get_guild()

    The guild the stage is hosted.


  • int channel_id

    The stage channel id of the stage instance.


  • Guild.StageChannel channel

    method
    Getter get_channel()

    The stage channel where the stage is hosted.


  • String topic

    Stage topic.


  • int privacy_level

    The privacy level of the Stage instance.


  • deprecated bool discoverable

    There is currently no description for this property.

Method Descriptions


Role

Inherits: MentionableEntity < DiscordEntity < Reference < Object

Description

Represents a set of permissions attached to a group of users.

Properties

type name
String name
Color color
bool hoist
int position
BitFlag permissions
bool is_managed
bool mentionable
Guild.Role.Tags tags
int guild_id
Guild guild

Methods

return type signature
Guild get_guild ( )
RoleEditAction edit ( )
Variant delete ( )

Property Descriptions

  • String name

    Role name.


  • Color color

    Role color.


  • bool hoist

    If this role is pinned in the user listing.


  • int position

    Role position.


  • BitFlag permissions

    Permissions of the role.


  • bool is_managed

    Whether this role is managed by an integration.


  • bool mentionable

    Whether this role is mentionable.


  • Guild.Role.Tags tags

    The tags this role has.


  • int guild_id

    Guild id of the role.


  • Guild guild

    method
    Getter get_guild()

    The guild the role is in.

Method Descriptions

  • Guild get_guild ( )

    guild getter.


  • RoleEditAction edit ( )

    Modify the role. Requires the MANAGE_ROLES permission.


  • Variant delete ( )

    Delete the role. Requires the MANAGE_ROLES permission.


Sub Classes


Tags

Inherits: Reference < Object

Properties

type name
int bot_id
int integration_id
bool premium_subscriber

Methods

return type signature
Guild.Role.Tags duplicate ( )

Property Descriptions

  • int bot_id

    There is currently no description for this property.


  • int integration_id

    There is currently no description for this property.


  • bool premium_subscriber

    There is currently no description for this property.

Method Descriptions

  • Guild.Role.Tags duplicate ( )

    There is currently no description for this method.



GuildEmoji

Inherits: Emoji < MentionableEntity < DiscordEntity < Reference < Object

Description

Represents a custom guild emoji.

Properties

type name
int guild_id
Guild guild
Array roles_ids
Array roles
int user_id
User user
bool is_managed
bool is_animated
bool available

Methods

return type signature
Guild get_guild ( )
Array get_roles ( )
User get_user ( )

Property Descriptions

  • int guild_id

    Guild id of the emoji.


  • Guild guild

    method
    Getter get_guild()

    The guild the emoji is from.


  • Array roles_ids

    Role ids of the roles that can use the emoji.


  • Array roles

    method
    Getter get_roles()

    Roles allowed to use this emoji.


  • int user_id

    User id that created this emoji.


  • User user

    method
    Getter get_user()

    The user that created this emoji.


  • bool is_managed

    Whether this emoji is managed by an integration.


  • bool is_animated

    Whether this emoji is animated.


  • bool available

    Whether this emoji can be used, may be false due to loss of Server Boosts

Method Descriptions

  • Guild get_guild ( )

    guild getter.


  • Array get_roles ( )

    roles getter.


  • User get_user ( )

    user getter.



VoiceState

Inherits: DiscordEntity < Reference < Object

Description

Represents a user's voice connection status.

Properties

type name
int guild_id
Guild guild
int channel_id
Guild.GuildVoiceChannel channel
User user
Guild.Member member
String session_id
bool is_deafened
bool is_muted
bool self_deaf
bool self_mute
bool self_stream
bool self_video
bool suppress
int request_to_speak

Methods

return type signature
Guild get_guild ( )
Guild.GuildVoiceChannel get_channel ( )
User get_user ( )
Guild.Member get_member ( )

Property Descriptions

  • int guild_id

    Guild id of the voice state.


  • Guild guild

    method
    Getter get_guild()

    The guild the voice state is from.


  • int channel_id

    The voice channel id this user is connected to.


  • Guild.GuildVoiceChannel channel

    method
    Getter get_channel()

    The voice channel this user is connected to.


  • User user

    method
    Getter get_user()

    The user id this voice state is for.


  • Guild.Member member

    method
    Getter get_member()

    The guild member this voice state is for.


  • String session_id

    The session id for this voice state.


  • bool is_deafened

    Whether this user is deafened by the server.


  • bool is_muted

    Whether this user is muted by the server.


  • bool self_deaf

    Whether this user is locally deafened.


  • bool self_mute

    Whether this user is locally muted.


  • bool self_stream

    Whether this user is streaming.


  • bool self_video

    Whether this user's camera is enabled.


  • bool suppress

    Whether this user is muted by the current user.


  • int request_to_speak

    The unix time at which the user requested to speak.

Method Descriptions


Invite

Inherits: Reference < Object

Description

Represents an invitation to a guild.

Properties

type name
String code
Guild guild
PartialChannel channel
User inviter
int target_type
User target_user
DiscordApplication target_application
int presence_count
int member_count
int expires_at
StageInstanceInvite stage_instance
Guild.GuildScheduledEvent scheduled_event

Constants

  • Dictionary TargetType

    • STREAM = 1

    • EMBEDDED_APPLICATION = 2

    Invite target types.

Property Descriptions

  • String code

    the invite code (unique ID).


  • Guild guild

    The guild this invite is for.


  • PartialChannel channel

    The channel this invite is for.


  • User inviter

    The user who created the invite.


  • int target_type

    The type of target for this voice channel invite.


  • User target_user

    The user whose stream to display for this voice channel stream invite.


  • DiscordApplication target_application

    The embedded application to open for this voice channel embedded application invite.


  • int presence_count

    Approximate count of online members.


  • int member_count

    Approximate count of total members.


  • int expires_at

    the expiration date of this invite.


  • deprecated StageInstanceInvite stage_instance

    There is currently no description for this property.


  • Guild.GuildScheduledEvent scheduled_event

    Guild scheduled event data, only included if thee is a scheduled event in the channel this invite is for.


GuildScheduledEvent

Inherits: DiscordEntity < Reference < Object

Description

Represents a scheduled event in a guild.

Properties

type name
int guild_id
int channel_id
int creator_id
User creator
String name
String description
int start_time
int end_time
int privacy_level
int status
int user_count
int entity_id
int entity_type
Guild.ScheduledEventMetadata entity_metadata

Constants

  • Dictionary PrivacyLevel

    • GUILD_ONLY = 2

    Event privacy levels.


  • Dictionary EntityType

    • STAGE_INSTANCE = 1

    • VOICE = 2

    • EXTERNAL = 3

    Event entity types.


  • Dictionary EventStatus

    • SCHEDULED = 1

    • ACTIVE = 2

    • COMPLETED = 3

    • CANCELED = 4

    Event status.

Property Descriptions

  • int guild_id

    The guild id which the scheduled event belongs to.


  • int channel_id

    The channel id in which the scheduled event will be hosted, or 0 if entity_type is EntityType.EXTERNAL.


  • int creator_id

    The id of the user that created the scheduled event.


  • User creator

    The user that created the scheduled event.


  • String name

    The name of the scheduled event.


  • String description

    The description of the scheduled event.


  • int start_time

    The unix time the scheduled event will start


  • int end_time

    The time the scheduled event will end, required if entity_type is EntityType.EXTERNAL.


  • int privacy_level

    The privacy level of the scheduled event.


  • int status

    The status of the scheduled event.


  • int user_count

    The number of users subscribed to the scheduled event.


  • int entity_id

    The id of an entity associated with a guild scheduled event.


  • int entity_type

    The type of the scheduled event.


  • Guild.ScheduledEventMetadata entity_metadata

    Additional metadata for the guild scheduled event.


ScheduledEventMetadata

Inherits: Reference < Object

Description

Contains additional information for a guild scheduled event.

Properties

type name
String location

Property Descriptions

  • String location

    Location of the event.