APIGuild

https://discord.com/developers/docs/resources/guild#guild-object-guild-structure

Signature

export interface APIGuild extends APIPartialGuild

Properties

icon_hash?: string | null;

Icon hash, returned when in the template object See https://discord.com/developers/docs/reference#image-formatting

discovery_splash: string | null;

Discovery splash hash; only present for guilds with the "DISCOVERABLE" feature See https://discord.com/developers/docs/reference#image-formatting

owner?: boolean;

`true` if the user is the owner of the guild **This field is only received from https://discord.com/developers/docs/resources/user#get-current-user-guilds**

permissions?: Permissions;

Total permissions for the user in the guild (excludes overrides) **This field is only received from https://discord.com/developers/docs/resources/user#get-current-user-guilds** See https://en.wikipedia.org/wiki/Bit_field

afk_timeout: 1800 | 3600 | 60 | 300 | 900;

afk timeout in seconds, can be set to: `60`, `300`, `900`, `1800`, `3600`

widget_enabled?: boolean;

`true` if the guild widget is enabled

widget_channel_id?: Snowflake | null;

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

roles: APIRole[];

Roles in the guild See https://discord.com/developers/docs/topics/permissions#role-object

emojis: APIEmoji[];

Custom guild emojis See https://discord.com/developers/docs/resources/emoji#emoji-object

features: GuildFeature[];

Enabled guild features See https://discord.com/developers/docs/resources/guild#guild-object-guild-features

mfa_level: GuildMFALevel;

Required MFA level for the guild See https://discord.com/developers/docs/resources/guild#guild-object-mfa-level

system_channel_id: Snowflake | null;

The id of the channel where guild notices such as welcome messages and boost events are posted

rules_channel_id: Snowflake | null;

The id of the channel where Community guilds can display rules and/or guidelines

max_presences?: number | null;

The maximum number of presences for the guild (`null` is always returned, apart from the largest of guilds)

max_members?: number;

The maximum number of members for the guild

vanity_url_code: string | null;

The vanity url code for the guild

description: string | null;

The description for the guild

banner: string | null;

Banner hash See https://discord.com/developers/docs/reference#image-formatting

premium_tier: GuildPremiumTier;

Premium tier (Server Boost level) See https://discord.com/developers/docs/resources/guild#guild-object-premium-tier

preferred_locale: LocaleString;

The preferred locale of a Community guild; used in guild discovery and notices from Discord; defaults to "en-US"

@default"en-US"
approximate_member_count?: number;

Approximate number of members in this guild, returned from the `GET /guilds/<id>` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true`

approximate_presence_count?: number;

Approximate number of non-offline members in this guild, returned from the `GET /guilds/<id>` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true`

nsfw_level: GuildNSFWLevel;

The nsfw level of the guild See https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level

stickers?: APISticker[];

Custom guild stickers See https://discord.com/developers/docs/resources/sticker#sticker-object

safety_alerts_channel_id: Snowflake | null;

The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord