Overview
The Guild interface provides access to all guild-specific data including members, channels, roles, and guild settings.Key Methods
Guild Information
The human readable name of the Guild.
The Snowflake id of this Guild.
The description for this guild. This is displayed in the server browser below the guild name for verified guilds.Returns
null if no description is set.The preferred locale for this guild.Defaults to
DiscordLocale.ENGLISH_USGuild Assets
The Discord hash-id of the Guild icon image. Returns
null if no icon has been set.The URL of the Guild icon image. Returns
null if no icon has been set.The guild banner id. This is shown in guilds below the guild name.Returns
null if no banner is set.The Discord hash-id of the splash image for this Guild. A Splash image is displayed when viewing a Discord Guild Invite.Returns
null if no splash has been set.Members
The expected member count for this guild. If the guild is not lazy loaded, this should be identical to the size of the member cache.
Gets a Member object by user id.Returns
null if no member with that id exists in this guild.A cache view of all Members in this Guild.
Retrieves a member by their user id.
Loads all members of this guild. This requires the GUILD_MEMBERS intent.
Roles
Gets all Roles in this Guild. The roles are ordered by their position descending (highest role first).
Gets a Role by its id.Returns
null if no role with that id exists.Gets the @everyone Role for this Guild.
Creates a new Role in this Guild.
Channels
Gets all GuildChannels in this Guild.
Gets all TextChannels in this Guild.
Gets all VoiceChannels in this Guild.
Gets a GuildChannel by its id.Returns
null if no channel with that id exists.Guild Features
The features of the Guild. Features can indicate special capabilities or requirements.
The boost tier for this guild. Each tier unlocks new perks for a guild.
The amount of boosts this server currently has.
Sorted list of Members that boost this guild. The list is sorted by time boosted ascending.
Management
The GuildManager for this Guild. Used to modify guild settings.
Bans a user from this Guild and deletes messages based on the deletion timeframe.
Kicks a Member from this Guild.
Adds a Role to a Member.
Removes a Role from a Member.