.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);Class
Represents a Fluxer guild (server).
Extends Base
Construct a guild from API data.
new Guild(client: Client, data: GuildData)| Name | Type | Description |
|---|---|---|
| afkChannelId | string | null | AFK voice channel ID, or null if none. |
| afkTimeout | number | AFK timeout in seconds. |
| available | boolean | Whether the guild is currently available through the gateway. |
| banner | string | null | Banner hash (use bannerURL to get full CDN URL). |
| bannerHeight? | number | null | Banner height in pixels. |
| bannerWidth? | number | null | Banner width in pixels. |
| channels | LimitedCollection<string, GuildChannel> | Cached channels in this guild. |
| clientread-only | Client | The Client that instantiated this guild. |
| contentWarningLevel | ContentWarningLevel | Content warning level. |
| contentWarningText | string | null | Custom guild-wide content warning text. |
| createdAtread-only | Date | Date when this guild was created, derived from its snowflake ID. |
| createdTimestampread-only | number | Unix timestamp (ms) when this guild was created, derived from its snowflake ID. |
| defaultMessageNotifications | DefaultMessageNotifications | Default notification level for members. |
| disabledOperations | number | GuildOperations bitfield of disabled operations. |
| embedSplash | string | null | Embed splash hash. |
| emojis | LimitedCollection<string, GuildEmoji> | Cached emojis in this guild. |
| explicitContentFilter | GuildExplicitContentFilter | Explicit content filter level. |
| features | GuildFeature[] | Features enabled for this guild. |
| icon | string | null | Icon hash (use iconURL to get full CDN URL). |
| idread-only | string | Snowflake ID of this guild. |
| memberCount | number | null | Last known member count, or null if none has been received. |
| members | GuildMemberManager | Member manager for this guild (fetch/add/remove members). |
| messageHistoryCutoff | string | null | ISO-8601 timestamp before which message history is not available. |
| mfaLevel | GuildMFALevel | MFA level required for moderation actions. |
| name | string | Guild name. |
| nsfw | boolean | Whether the guild is marked as adult (18+) content. |
| nsfwLevel | GuildNSFWLevel | NSFW level for this guild. |
| onlineCount | number | null | Last known online member count, or null if none has been received. |
| ownerId | string | User ID of the guild owner. |
| permissions | string | null | Permissions for the current member in this guild (bitfield string). |
| roles | GuildRoleManager | Cached roles in this guild. |
| rulesChannelId | string | null | Rules channel ID (for Community guilds), or null if none. |
| splash | string | null | Invite splash hash (use splashURL to get full CDN URL). |
| splashCardAlignment | SplashCardAlignment | Splash card alignment. |
| splashHeight? | number | null | Splash height in pixels. |
| splashWidth? | number | null | Splash width in pixels. |
| stickers | LimitedCollection<string, GuildSticker> | Cached stickers in this guild. |
| systemChannelFlags | number | SystemChannelFlags bitfield. |
| systemChannelId | string | null | System messages channel ID, or null if none. |
| vanityURLCode | string | null | Vanity invite code if the guild has one. |
| verificationLevel | GuildVerificationLevel | Verification level required for members to send messages. |
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);body: DiscoveryApplicationOptions → Promise<DiscoveryApplicationPayload>
Apply for guild discovery.
guild.applyForDiscovery(body);userId: string, options?: GuildBanOptions → Promise<void>
Ban a user from the guild. Requires Ban Members. banDurationSeconds: 0 = permanent.
guild.ban(userId);options?: { size?: number; } → string | null
Get the full CDN URL for the guild's banner (or null).
guild.bannerURL();sourceEmojiId: string → Promise<GuildEmoji>
Clone an emoji from another guild. Requires Manage Emojis and Stickers.
guild.cloneEmoji(sourceEmojiId);sourceStickerId: string → Promise<GuildSticker>
Clone a sticker from another guild. Requires Manage Emojis and Stickers.
guild.cloneSticker(sourceStickerId);options: GuildChannelCreateOptions → Promise<GuildChannel>
Create a channel. type: 0=text, 2=voice, 4=category, 998=link (set url). Requires Manage Channels.
guild.createChannel(options);options: { name: string; image: string; } → Promise<GuildEmoji>
Create a new emoji in this guild. Requires Manage Emojis and Stickers.
guild.createEmoji(options);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);options: RoleCreateOptions → Promise<Role>
Create a role. permissions accepts a bitfield string or PermissionResolvable.
await guild.createRole({ name: 'Mod', permissions: ['KickMembers', 'BanMembers'] });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);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);options?: SudoVerificationOptions → Promise<void>
Delete this guild (owner only). User accounts may need sudo/MFA in options.
guild.delete();options: GuildEditOptions → Promise<this>
Edit guild settings. Requires guild owner or Administrator.
guild.edit(options);body: DiscoveryApplicationOptions → Promise<DiscoveryApplicationPayload>
Edit an existing discovery application.
guild.editDiscoveryApplication(body);code: string | null → Promise<VanityURLPayload>
Edit the guild's vanity invite code.
guild.editVanityURL(code);options?: { limit?: number; before?: string; after?: string; userId?: string; actionType?: AuditLogActionType; } → Promise<AuditLogFetchPayload>
Fetch audit log entries. Requires View Audit Log.
guild.fetchAuditLogs();→ Promise<GuildBan[]>
Fetch all bans in this guild. Requires Ban Members.
guild.fetchBans();→ Promise<GuildChannel[]>
Fetch all channels in this guild from the API.
guild.fetchChannels();→ Promise<DiscoveryStatusPayload>
Fetch the guild's discovery status.
guild.fetchDiscoveryStatus();emojiId: string → Promise<GuildEmoji>
Fetch a specific emoji by ID.
guild.fetchEmoji(emojiId);→ Promise<GuildEmoji[]>
Fetch all emojis in this guild from the API.
guild.fetchEmojis();codeOrUrl: string → Promise<Invite>
Fetch a specific invite by code or URL.
guild.fetchInvite(codeOrUrl);→ Promise<Invite[]>
Fetch all invites in this guild. Requires Manage Guild.
guild.fetchInvites();→ Promise<GuildMember>
Fetch the bot's own member object in this guild.
guild.fetchMe();userId: string → Promise<GuildMember>
Fetch a guild member by user ID.
guild.fetchMember(userId);roleId: string → Promise<Role>
Fetch a specific role by ID.
guild.fetchRole(roleId);→ Promise<Role[]>
Fetch all roles in this guild from the API.
guild.fetchRoles();stickerId: string → Promise<GuildSticker>
Fetch a specific sticker by ID.
guild.fetchSticker(stickerId);→ Promise<GuildSticker[]>
Fetch all stickers in this guild from the API.
guild.fetchStickers();→ Promise<VanityURLPayload>
Fetch the guild's vanity invite URL (if available).
guild.fetchVanityURL();→ Promise<Webhook[]>
Fetch all webhooks in this guild.
guild.fetchWebhooks();options?: { size?: number; } → string | null
Get the full CDN URL for the guild's icon (or null).
guild.iconURL();userId: string → Promise<void>
Kick a user from the guild. Requires Kick Members.
guild.kick(userId);→ Promise<Role[]>
Reset all role hoist positions to zero. Returns cached Role instances.
guild.resetRoleHoistPositions();arg: string → Promise<string | null>
Resolve role mention, snowflake, or name to a role ID.
guild.resolveRoleId(arg);updates: ChannelPositionUpdate[] → Promise<void>
Update channel positions (reordering).
guild.setChannelPositions(updates);updates: Array<{ id: string; hoistPosition?: number }> → Promise<Role[]>
Update role hoist positions (visual separator groups). Returns cached Role instances.
guild.setRoleHoistPositions(updates);updates: Array<{ id: string; position?: number }> → Promise<Role[]>
Update role positions (reordering). Returns cached Role instances.
guild.setRolePositions(updates);options?: { size?: number; } → string | null
Get the full CDN URL for the guild's invite splash (or null).
guild.splashURL();→ string
The guild's name.
guild.toString();newOwnerId: string, password?: string → Promise<void>
Transfer guild ownership to another user (owner only).
guild.transferOwnership(newOwnerId);userId: string → Promise<void>
Unban a user from the guild. Requires Ban Members.
guild.unban(userId);→ Promise<void>
Withdraw the guild's discovery application.
guild.withdrawDiscoveryApplication();