Class

Guild

Represents a Fluxer guild (server).

Extends Base

Constructor

Construct a guild from API data.

new Guild(client: Client, data: GuildData)
client
Client
data
GuildDataAPI guild from GET /guilds/{id} or gateway GUILD_CREATE

Properties

NameTypeDescription
afkChannelIdstring | nullAFK voice channel ID, or null if none.
afkTimeoutnumberAFK timeout in seconds.
availablebooleanWhether the guild is currently available through the gateway.
bannerHeight?number | nullBanner height in pixels.
bannerWidth?number | nullBanner width in pixels.
channelsLimitedCollection<string, GuildChannel>Cached channels in this guild.
clientread-onlyClientThe Client that instantiated this guild.
contentWarningLevelContentWarningLevelContent warning level.
contentWarningTextstring | nullCustom guild-wide content warning text.
createdAtread-onlyDateDate when this guild was created, derived from its snowflake ID.
createdTimestampread-onlynumberUnix timestamp (ms) when this guild was created, derived from its snowflake ID.
defaultMessageNotificationsDefaultMessageNotificationsDefault notification level for members.
disabledOperationsnumberGuildOperations bitfield of disabled operations.
embedSplashstring | nullEmbed splash hash.
emojisLimitedCollection<string, GuildEmoji>Cached emojis in this guild.
explicitContentFilterGuildExplicitContentFilterExplicit content filter level.
featuresGuildFeature[]Features enabled for this guild.
iconstring | nullIcon hash (use iconURL to get full CDN URL).
idread-onlystringSnowflake ID of this guild.
memberCountnumber | nullLast known member count, or null if none has been received.
membersGuildMemberManagerMember manager for this guild (fetch/add/remove members).
messageHistoryCutoffstring | nullISO-8601 timestamp before which message history is not available.
mfaLevelGuildMFALevelMFA level required for moderation actions.
namestringGuild name.
nsfwbooleanWhether the guild is marked as adult (18+) content.
nsfwLevelGuildNSFWLevelNSFW level for this guild.
onlineCountnumber | nullLast known online member count, or null if none has been received.
ownerIdstringUser ID of the guild owner.
permissionsstring | nullPermissions for the current member in this guild (bitfield string).
rolesGuildRoleManagerCached roles in this guild.
rulesChannelIdstring | nullRules channel ID (for Community guilds), or null if none.
splashstring | nullInvite splash hash (use splashURL to get full CDN URL).
splashCardAlignmentSplashCardAlignmentSplash card alignment.
splashHeight?number | nullSplash height in pixels.
splashWidth?number | nullSplash width in pixels.
stickersLimitedCollection<string, GuildSticker>Cached stickers in this guild.
systemChannelFlagsnumberSystemChannelFlags bitfield.
systemChannelIdstring | nullSystem messages channel ID, or null if none.
vanityURLCodestring | nullVanity invite code if the guild has one.
verificationLevelGuildVerificationLevelVerification level required for members to send messages.

Methods

.adjustMemberCount(delta)

delta: | -void

Adjust memberCount after a join/leave when a baseline is known. No-op while the count is still unknown (null).

guild.adjustMemberCount(delta);

.bannerURL(options?)

options?: { size?: number; }string | null

Get the full CDN URL for the guild's banner (or null).

guild.bannerURL();

.createEmoji(options)

options: { name: string; image: string; }Promise<GuildEmoji>

Create a new emoji in this guild. Requires Manage Emojis and Stickers.

guild.createEmoji(options);

.createEmojisBulk(emojiList)

emojiList: Array<{ name: string; image: string }>Promise<{ success: GuildEmoji[]; failed: Array<{ name: string; error: string }> }>

Create multiple emojis at once (bulk operation).

guild.createEmojisBulk(emojiList);

.createSticker(options)

options: { name: string; image: string; description?: string | null; tags?: string[]; }Promise<GuildSticker>

Create a new sticker in this guild. Requires Manage Emojis and Stickers.

guild.createSticker(options);

.createStickersBulk(stickerList)

stickerList: Array<{ name: string; image: string; description?: string; tags?: string[] }>Promise<{ success: GuildSticker[]; failed: Array<{ name: string; error: string }> }>

Create multiple stickers at once (bulk operation).

guild.createStickersBulk(stickerList);

.fetchBans()

Promise<GuildBan[]>

Fetch all bans in this guild. Requires Ban Members.

guild.fetchBans();

.fetchInvites()

Promise<Invite[]>

Fetch all invites in this guild. Requires Manage Guild.

guild.fetchInvites();

.fetchRoles()

Promise<Role[]>

Fetch all roles in this guild from the API.

guild.fetchRoles();

.iconURL(options?)

options?: { size?: number; }string | null

Get the full CDN URL for the guild's icon (or null).

guild.iconURL();

.kick(userId)

userId: stringPromise<void>

Kick a user from the guild. Requires Kick Members.

guild.kick(userId);

.resolveRoleId(arg)

arg: stringPromise<string | null>

Resolve role mention, snowflake, or name to a role ID.

guild.resolveRoleId(arg);

.setRoleHoistPositions(updates)

updates: Array<{ id: string; hoistPosition?: number }>Promise<Role[]>

Update role hoist positions (visual separator groups). Returns cached Role instances.

guild.setRoleHoistPositions(updates);

.setRolePositions(updates)

updates: Array<{ id: string; position?: number }>Promise<Role[]>

Update role positions (reordering). Returns cached Role instances.

guild.setRolePositions(updates);

.splashURL(options?)

options?: { size?: number; }string | null

Get the full CDN URL for the guild's invite splash (or null).

guild.splashURL();

.toString()

string

The guild's name.

guild.toString();

.unban(userId)

userId: stringPromise<void>

Unban a user from the guild. Requires Ban Members.

guild.unban(userId);