Guild object
Fields specific to the
GUILD_CREATE event are listed in the Gateway Events documentation.Guild structure
Guild id
Guild name (2-100 characters, excluding trailing and leading whitespace)
Discovery splash hash; only present for guilds with the
DISCOVERABLE featureTrue if the user is the owner of the guild. Only sent when using the Get Current User Guilds endpoint.
ID of owner
Total permissions for the user in the guild (excludes overwrites and implicit permissions). Only sent when using the Get Current User Guilds endpoint.
ID of afk channel
AFK timeout in seconds
True if the server widget is enabled
The channel id that the widget will generate an invite to, or
null if set to no inviteVerification level required for the guild
Default message notifications level
Roles in the guild
Custom guild emojis
Enabled guild features
Application id of the guild creator if it is bot-created
The id of the channel where guild notices such as welcome messages and boost events are posted
The id of the channel where Community guilds can display rules and/or guidelines
The maximum number of presences for the guild (
null is always returned, apart from the largest of guilds)The maximum number of members for the guild
The vanity url code for the guild
The description of a guild
Premium tier (Server Boost level)
The number of boosts this guild currently has
The preferred locale of a Community guild; used in server discovery and notices from Discord; defaults to “en-US”
The id of the channel where admins and moderators of Community guilds receive notices from Discord
The maximum amount of users in a video channel
The maximum amount of users in a stage video channel
Approximate number of members in this guild. Returned when
with_counts is true.Approximate number of non-offline members in this guild. Returned when
with_counts is true.The welcome screen of a Community guild, shown to new members
Custom guild stickers
Whether the guild has the boost progress bar enabled
The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
The incidents data for this guild
Default message notification level
| Key | Value | Description |
|---|---|---|
ALL_MESSAGES | 0 | Members will receive notifications for all messages by default |
ONLY_MENTIONS | 1 | Members will receive notifications only for messages that @mention them by default |
Explicit content filter level
| Level | Integer | Description |
|---|---|---|
DISABLED | 0 | Media content will not be scanned |
MEMBERS_WITHOUT_ROLES | 1 | Media content sent by members without roles will be scanned |
ALL_MEMBERS | 2 | Media content sent by all members will be scanned |
MFA level
| Level | Integer | Description |
|---|---|---|
NONE | 0 | Guild has no MFA/2FA requirement for moderation actions |
ELEVATED | 1 | Guild has a 2FA requirement for moderation actions |
Verification level
| Level | Integer | Description |
|---|---|---|
NONE | 0 | Unrestricted |
LOW | 1 | Must have verified email on account |
MEDIUM | 2 | Must be registered on Discord for longer than 5 minutes |
HIGH | 3 | Must be a member of the server for longer than 10 minutes |
VERY_HIGH | 4 | Must have a verified phone number |
Guild NSFW level
| Level | Value |
|---|---|
DEFAULT | 0 |
EXPLICIT | 1 |
SAFE | 2 |
AGE_RESTRICTED | 3 |
Premium tier
| Level | Integer | Description |
|---|---|---|
NONE | 0 | Guild has not unlocked any Server Boost perks |
TIER_1 | 1 | Guild has unlocked Server Boost level 1 perks |
TIER_2 | 2 | Guild has unlocked Server Boost level 2 perks |
TIER_3 | 3 | Guild has unlocked Server Boost level 3 perks |
System channel flags
| Flag | Value | Description |
|---|---|---|
SUPPRESS_JOIN_NOTIFICATIONS | 1 << 0 | Suppress member join notifications |
SUPPRESS_PREMIUM_SUBSCRIPTIONS | 1 << 1 | Suppress server boost notifications |
SUPPRESS_GUILD_REMINDER_NOTIFICATIONS | 1 << 2 | Suppress server setup tips |
SUPPRESS_JOIN_NOTIFICATION_REPLIES | 1 << 3 | Hide member join sticker reply buttons |
SUPPRESS_ROLE_SUBSCRIPTION_PURCHASE_NOTIFICATIONS | 1 << 4 | Suppress role subscription purchase and renewal notifications |
SUPPRESS_ROLE_SUBSCRIPTION_PURCHASE_NOTIFICATION_REPLIES | 1 << 5 | Hide role subscription sticker reply buttons |
Guild features
| Feature | Description |
|---|---|
ANIMATED_BANNER | Guild has access to set an animated guild banner image |
ANIMATED_ICON | Guild has access to set an animated guild icon |
APPLICATION_COMMAND_PERMISSIONS_V2 | Guild is using the old permissions configuration behavior |
AUTO_MODERATION | Guild has set up auto moderation rules |
BANNER | Guild has access to set a guild banner image |
COMMUNITY | Guild can enable welcome screen, Membership Screening, and stage channels |
CREATOR_MONETIZABLE_PROVISIONAL | Guild has enabled monetization |
CREATOR_STORE_PAGE | Guild has enabled the role subscription promo page |
DEVELOPER_SUPPORT_SERVER | Guild has been set as a support server on the App Directory |
DISCOVERABLE | Guild is able to be discovered in the directory |
FEATURABLE | Guild is able to be featured in the directory |
INVITES_DISABLED | Guild has paused invites, preventing new users from joining |
INVITE_SPLASH | Guild has access to set an invite splash background |
MEMBER_VERIFICATION_GATE_ENABLED | Guild has enabled Membership Screening |
MORE_SOUNDBOARD | Guild has increased custom soundboard sound slots |
MORE_STICKERS | Guild has increased custom sticker slots |
NEWS | Guild has access to create announcement channels |
PARTNERED | Guild is partnered |
PREVIEW_ENABLED | Guild can be previewed before joining via Membership Screening |
RAID_ALERTS_DISABLED | Guild has disabled alerts for join raids in the safety alerts channel |
ROLE_ICONS | Guild is able to set role icons |
ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE | Guild has role subscriptions that can be purchased |
ROLE_SUBSCRIPTIONS_ENABLED | Guild has enabled role subscriptions |
SOUNDBOARD | Guild has created soundboard sounds |
TICKETED_EVENTS_ENABLED | Guild has enabled ticketed events |
VANITY_URL | Guild has access to set a vanity URL |
VERIFIED | Guild is verified |
VIP_REGIONS | Guild has access to set 384kbps bitrate in voice |
WELCOME_SCREEN_ENABLED | Guild has enabled the welcome screen |
GUESTS_ENABLED | Guild has access to guest invites |
GUILD_TAGS | Guild has access to set guild tags |
ENHANCED_ROLE_COLORS | Guild is able to set gradient colors to roles |
Mutable guild features
| Feature | Required permissions | Effects |
|---|---|---|
COMMUNITY | Administrator | Enables Community Features in the guild |
DISCOVERABLE | Administrator* | Enables discovery in the guild, making it publicly listed |
INVITES_DISABLED | Manage Guild | Pauses all invites/access to the server |
RAID_ALERTS_DISABLED | Manage Guild | Disables alerts for join raids |
Example guild
Guild member object
Guild member structure
The user this guild member represents. Not included in the member object attached to
MESSAGE_CREATE and MESSAGE_UPDATE gateway events.This user’s guild nickname
The member’s guild avatar hash
The member’s guild banner hash
Array of role object ids
When the user joined the guild
When the user started boosting the guild
Whether the user is deafened in voice channels
Whether the user is muted in voice channels
Guild member flags represented as a bit set, defaults to
0Whether the user has not yet passed the guild’s Membership Screening requirements
Total permissions of the member in the channel, including overwrites, returned when in the interaction object
When the user’s timeout will expire and the user will be able to communicate in the guild again, null or a time in the past if the user is not timed out
Data for the member’s guild avatar decoration
Guild member flags
| Flag | Value | Description | Editable |
|---|---|---|---|
DID_REJOIN | 1 << 0 | Member has left and rejoined the guild | false |
COMPLETED_ONBOARDING | 1 << 1 | Member has completed onboarding | false |
BYPASSES_VERIFICATION | 1 << 2 | Member is exempt from guild verification requirements | true |
STARTED_ONBOARDING | 1 << 3 | Member has started onboarding | false |
IS_GUEST | 1 << 4 | Member is a guest and can only access the voice channel they were invited to | false |
STARTED_HOME_ACTIONS | 1 << 5 | Member has started Server Guide new member actions | false |
COMPLETED_HOME_ACTIONS | 1 << 6 | Member has completed Server Guide new member actions | false |
AUTOMOD_QUARANTINED_USERNAME | 1 << 7 | Member’s username, display name, or nickname is blocked by AutoMod | false |
DM_SETTINGS_UPSELL_ACKNOWLEDGED | 1 << 9 | Member has dismissed the DM settings upsell | false |
AUTOMOD_QUARANTINED_GUILD_TAG | 1 << 10 | Member’s guild tag is blocked by AutoMod | false |
Ban object
The reason for the ban
The banned user
Welcome screen object
The server description shown in the welcome screen
The channels shown in the welcome screen, up to 5
Welcome screen channel structure
The channel’s id
The description shown for the channel
The emoji id, if the emoji is custom
The emoji name if custom, the unicode character if standard, or
null if no emoji is setIncidents data object
When invites get enabled again
When direct messages get enabled again
When the DM spam was detected
When the raid was detected
Get guild
GET
/guilds/{guild.id}with_counts is set to true, this endpoint will also return approximate_member_count and approximate_presence_count for the guild.
Query string params
When
true, will return approximate member and presence counts for the guildGet guild preview
GET
/guilds/{guild.id}/previewModify guild
PATCH
/guilds/{guild.id}MANAGE_GUILD permission. Returns the updated guild object on success.
All parameters to this endpoint are optional.
This endpoint supports the
X-Audit-Log-Reason header.JSON params
Guild name
Verification level
Default message notification level
Explicit content filter level
ID for afk channel
AFK timeout in seconds; can be set to: 60, 300, 900, 1800, 3600
Base64 1024x1024 png/jpeg/gif image for the guild icon
Base64 16:9 png/jpeg image for the guild splash
Base64 16:9 png/jpeg image for the guild discovery splash
Base64 16:9 png/jpeg image for the guild banner
The id of the channel where guild notices are posted
System channel flags
The id of the channel where Community guilds display rules
The id of the channel where admins and moderators receive notices from Discord
The preferred locale of a Community guild; defaults to “en-US”
Enabled guild features
The description for the guild
Whether the guild’s boost progress bar should be enabled
The id of the channel where admins and moderators receive safety alerts from Discord
Get guild channels
GET
/guilds/{guild.id}/channelsCreate guild channel
POST
/guilds/{guild.id}/channelsMANAGE_CHANNELS permission. Returns the new channel object on success.
This endpoint supports the
X-Audit-Log-Reason header.JSON params
| Field | Type | Description | Channel type |
|---|---|---|---|
name | string | Channel name (1-100 characters) | All |
type | integer | The type of channel | All |
topic | string | Channel topic (0-1024 characters) | Text, Announcement, Forum, Media |
bitrate | integer | Bitrate in bits per second; min 8000 | Voice, Stage |
user_limit | integer | The user limit of the voice channel | Voice, Stage |
rate_limit_per_user | integer | Slowmode in seconds (0-21600) | Text, Voice, Stage, Forum, Media |
position | integer | Sorting position of the channel | All |
permission_overwrites | array | The channel’s permission overwrites | All |
parent_id | snowflake | ID of the parent category for a channel | Text, Voice, Announcement, Stage, Forum, Media |
nsfw | boolean | Whether the channel is age-restricted | Text, Voice, Announcement, Stage, Forum |
rtc_region | string | Channel voice region id | Voice, Stage |
video_quality_mode | integer | Camera video quality mode | Voice, Stage |
default_auto_archive_duration | integer | Default thread auto-archive duration in minutes | Text, Announcement, Forum, Media |
default_reaction_emoji | object | Emoji to show in the add reaction button on a thread | Forum, Media |
available_tags | array | Set of tags that can be used in a forum/media channel | Forum, Media |
default_sort_order | integer | Default sort order type | Forum, Media |
default_forum_layout | integer | Default forum layout view | Forum |
default_thread_rate_limit_per_user | integer | Initial rate limit for newly created threads | Text, Announcement, Forum, Media |
Modify guild channel positions
PATCH
/guilds/{guild.id}/channelsMANAGE_CHANNELS permission. Returns a 204 empty response on success.
JSON params (array)
Channel id
Sorting position of the channel
Syncs the permission overwrites with the new parent, if moving to a new category
The new parent ID for the channel that is moved
List active guild threads
GET
/guilds/{guild.id}/threads/activeid, in descending order.
Get guild member
GET
/guilds/{guild.id}/members/{user.id}List guild members
GET
/guilds/{guild.id}/membersQuery string params
Max number of members to return (1-1000)
The highest user id in the previous page
Search guild members
GET
/guilds/{guild.id}/members/searchQuery string params
Query string to match username(s) and nickname(s) against
Max number of members to return (1-1000)
Add guild member
PUT
/guilds/{guild.id}/members/{user.id}guilds.join scope. Returns a 201 Created with the guild member as the body, or 204 No Content if the user is already a member.
JSON params
An OAuth2 access token granted with the
guilds.join scope for the user you want to addValue to set user’s nickname to. Requires
MANAGE_NICKNAMES permission.Array of role ids the member is assigned. Requires
MANAGE_ROLES permission.Whether the user is muted in voice channels. Requires
MUTE_MEMBERS permission.Whether the user is deafened in voice channels. Requires
DEAFEN_MEMBERS permission.Modify guild member
PATCH
/guilds/{guild.id}/members/{user.id}This endpoint supports the
X-Audit-Log-Reason header.JSON params
Value to set user’s nickname to. Requires
MANAGE_NICKNAMES permission.Array of role ids the member is assigned. Requires
MANAGE_ROLES permission.Whether the user is muted in voice channels. Requires
MUTE_MEMBERS permission.Whether the user is deafened in voice channels. Requires
DEAFEN_MEMBERS permission.ID of channel to move user to (if they are connected to voice). Requires
MOVE_MEMBERS permission.When the user’s timeout will expire (up to 28 days in the future). Set to null to remove timeout. Requires
MODERATE_MEMBERS permission.Guild member flags
Modify current member
PATCH
/guilds/{guild.id}/members/@meThis endpoint supports the
X-Audit-Log-Reason header.JSON params
Value to set user’s nickname to. Requires
CHANGE_NICKNAME permission.Data URI base64 encoded banner image
Data URI base64 encoded avatar image
Guild member bio
Remove guild member
DELETE
/guilds/{guild.id}/members/{user.id}KICK_MEMBERS permission. Returns a 204 empty response on success.
Get guild bans
GET
/guilds/{guild.id}/bansBAN_MEMBERS permission.
Query string params
Number of users to return (up to maximum 1000)
Consider only users before given user id
Consider only users after given user id
Get guild ban
GET
/guilds/{guild.id}/bans/{user.id}BAN_MEMBERS permission.
Create guild ban
PUT
/guilds/{guild.id}/bans/{user.id}BAN_MEMBERS permission. Returns a 204 empty response on success.
This endpoint supports the
X-Audit-Log-Reason header.JSON params
Number of seconds to delete messages for, between 0 and 604800 (7 days)
Remove guild ban
DELETE
/guilds/{guild.id}/bans/{user.id}BAN_MEMBERS permission. Returns a 204 empty response on success.
Bulk guild ban
POST
/guilds/{guild.id}/bulk-banBAN_MEMBERS and MANAGE_GUILD permissions. Returns a 200 response on success, including banned_users with the IDs of the banned users and failed_users with IDs that could not be banned.
Add guild member role
PUT
/guilds/{guild.id}/members/{user.id}/roles/{role.id}MANAGE_ROLES permission. Returns a 204 empty response on success.
Remove guild member role
DELETE
/guilds/{guild.id}/members/{user.id}/roles/{role.id}MANAGE_ROLES permission. Returns a 204 empty response on success.