import { ChannelTypes, type ApplicationCommandTypes, type BigString, type DefaultMessageNotificationLevels, type DiscordEmoji, type DiscordGuild, type DiscordSticker, type ExplicitContentFilterLevels, type GuildFeatures, type GuildNsfwLevel, type MfaLevels, type PremiumTiers, type RequestGuildMembers, type SystemChannelFlags, type VerificationLevels } from '@discordeno/types'; import Base from '../../Base.js'; import type Client from '../../Client.js'; import type { ImageFormat, ImageSize } from '../../Client.js'; import Collection from '../../Collection.js'; import type Shard from '../../gateway/Shard.js'; import type { AnyGuildChannel, AnyThreadChannel, ApplicationCommand, ApplicationCommandPermissions, ApplicationCommandStructure, ChannelPosition, CreateChannelOptions, CreateStickerOptions, DiscoveryMetadata, DiscoveryOptions, DiscoverySubcategoryResponse, EditStickerOptions, Emoji, EmojiOptions, GetGuildAuditLogOptions, GetGuildBansOptions, GetPruneOptions, GetRESTGuildMembersOptions, GuildApplicationCommandPermissions, GuildAuditLog, GuildBan, GuildOptions, GuildTemplateOptions, GuildVanity, IntegrationOptions, ListedGuildThreads, MemberOptions, PruneMemberOptions, RoleOptions, Sticker, VoiceRegion, VoiceStateOptions, Webhook, WelcomeScreen, WelcomeScreenOptions, Widget, WidgetData } from '../../typings.js'; import type CategoryChannel from '../channels/Category.js'; import type GuildChannel from '../channels/Guild.js'; import type StageChannel from '../channels/Stage.js'; import type TextChannel from '../channels/Text.js'; import type TextVoiceChannel from '../channels/TextVoice.js'; import type ThreadChannel from '../channels/threads/Thread.js'; import type Invite from '../Invite.js'; import Permission from '../Permission.js'; import type GuildIntegration from './Integration.js'; import Member from './Member.js'; import Role from './Role.js'; import StageInstance from './StageInstance.js'; import type GuildTemplate from './Template.js'; import type { VoiceState } from './VoiceState.js'; export declare class Guild extends Base { /** The client object */ client: Client; /** The id of the guild owner. */ ownerID: string; /** The id of the application. */ applicationID?: string | null; /** The id of the widget channel. */ widgetChannelID?: string | null; /** The afk channel id if one is set. */ afkChannelID?: string | null; /** The system channel id if one is set. */ systemChannelID?: string | null; /** The public updates channel id if one is set. */ publicUpdatesChannelID?: string | null; /** The rules channel id if one is set. */ rulesChannelID?: string | null; /** The name of the guild. */ name?: string; /** The description of the guild. */ description?: string | null; /** The vanity url if one is set. */ vanityURL?: string | null; /** The preferred locale of the server. */ preferredLocale?: string; /** The system channel flags. */ systemChannelFlags?: SystemChannelFlags; /** The verification level of the guild. */ verificationLevel?: VerificationLevels; /** The default notification level. */ defaultNotifications?: DefaultMessageNotificationLevels; /** The explicit content filter setting for this guild. */ explicitContentFilter?: ExplicitContentFilterLevels; /** Array of guild features */ features: GuildFeatures[]; /** The premium tier of the guild. */ premiumTier?: PremiumTiers; /** The MFA level of the guild. */ mfaLevel?: MfaLevels; /** The NSFW level of the guild. */ nsfwLevel?: GuildNsfwLevel; /** The compressed form of the guild splash image. */ _splash?: bigint; /** The compressed form of the guild's discovery splash image. */ _discoverySplash?: bigint; /** The compressed form of the guild's banner image. */ _banner?: bigint; /** The compressed form of the guild's icon image. */ _icon?: bigint; /** The cached emojis in the guild. */ emojis?: DiscordEmoji[]; /** The cached stickers in the guild. */ stickers?: DiscordSticker[]; /** The afk timeout in seconds. */ afkTimeout?: number; /** When this guild was joined at. */ joinedAt: number; /** The amount of members in the guild. */ memberCount: number; /** The approximate member count in the guild. */ approximateMemberCount?: number; /** The approximate presence count in the guild. */ approximatePresenceCount?: number; /** The amount of subscribers to the server. */ premiumSubscriptionCount?: number; /** The maximum amount of presences that can be in a guild. */ maxPresences?: number | null; /** The maximum amount of members that can be in the guild. */ maxMembers?: number; /** The maximum amount of members that can be in a video channel. */ maxVideoChannelUsers?: number | null; /** Whether or not this guild is unavailable. */ unavailable: boolean; /** Whether or not the widget is enabled in this guild. */ widgetEnabled: boolean; /** Whether or not this guild is considered large. */ large?: boolean; /** Whether or not the premium progress bar is enabled. */ premiumProgressBarEnabled?: boolean; /** Whether or not this server is nsfw. */ nsfw?: boolean; /** The welcome screen settings. */ welcomeScreen?: { description: string | null; welcomeChannels?: Array<{ channelID: string; description: string; emojiID: string | null; emojiName: string | null; }>; }; /** The cached members in this guild. */ members: Collection; /** The cached roles in this guild. */ roles: Collection; /** The cached channels in this guild. */ channels: Collection; /** The cached threads in this guild. */ threads: Collection; /** The cached voice states in this guild. */ voiceStates: Collection; /** The cached stage instances in this guild. */ stageInstances: Collection; /** The shard that manages this guild. */ shard: Shard; constructor(data: DiscordGuild, client: Client); /** * @deprecated - please use .client */ get _client(): Client; update(data: DiscordGuild): void; get banner(): string | undefined; get bannerURL(): string | null; get icon(): string | undefined; get iconURL(): string | null; get splash(): string | undefined; get splashURL(): string | null; get discoverySplash(): string | undefined; get discoverySplashURL(): string | null; /** Add a discovery subcategory */ addDiscoverySubcategory(categoryID: BigString, reason?: string): Promise; /** Add a role to a guild member */ addMemberRole(memberID: BigString, roleID: BigString, reason?: string): Promise; /** Ban a user from the guild */ banMember(userID: BigString, deleteMessageDays?: number, reason?: string): Promise; /** Bulk create/edit guild application commands */ bulkEditCommands(commands: Array>): Promise>>; /** Create a channel in the guild */ createChannel(name: string, type: ChannelTypes | undefined, options: CreateChannelOptions): Promise; /** Create a guild application command */ createCommand(command: ApplicationCommandStructure): Promise>; /** Create a emoji in the guild */ createEmoji(options: EmojiOptions, reason?: string): Promise; /** Create a guild role */ createRole(options: Role | RoleOptions, reason?: string): Promise; /** Create a guild sticker */ createSticker(options: CreateStickerOptions, reason?: string): Promise; /** Create a template for this guild */ createTemplate(name: string, description?: string): Promise; /** Delete the guild (bot user must be owner) */ delete(): Promise; /** Delete a guild application command */ deleteCommand(commandID: BigString): Promise; /** Delete a discovery subcategory */ deleteDiscoverySubcategory(categoryID: BigString, reason?: string): Promise; /** Delete a emoji in the guild */ deleteEmoji(emojiID: BigString, reason?: string): Promise; /** Delete a guild integration */ deleteIntegration(integrationID: BigString): Promise; /** Delete a role */ deleteRole(roleID: BigString, reason?: string): Promise; /** Delete a guild sticker */ deleteSticker(stickerID: BigString, reason?: string): Promise; /** Delete a guild template */ deleteTemplate(code: string): Promise; /** Get the guild's banner with the given format and size */ dynamicBannerURL(format?: ImageFormat, size?: ImageSize): string | null; /** Get the guild's discovery splash with the given format and size */ dynamicDiscoverySplashURL(format?: ImageFormat, size?: ImageSize): string | null; /** Get the guild's icon with the given format and size */ dynamicIconURL(format?: ImageFormat, size?: ImageSize): string | null; /** Get the guild's splash with the given format and size */ dynamicSplashURL(format?: ImageFormat, size?: ImageSize): string | null; /** Edit the guild */ edit(options: GuildOptions, reason?: string): Promise; /** Edit multiple channels' positions. Note that channel position numbers are grouped by type (category, text, voice), then sorted in ascending order (lowest number is on top). */ editChannelPositions(channelPositions: ChannelPosition[]): Promise; /** Edit a guild application command */ editCommand(commandID: BigString, commands: ApplicationCommandStructure): Promise>; /** * Edits command permissions for a specific command in a guild. * Note: You can only add up to 10 permission overwrites for a command. */ editCommandPermissions(commandID: BigString, permissions: ApplicationCommandPermissions[]): Promise; /** Edit the guild's discovery data */ editDiscovery(options: DiscoveryOptions): Promise; /** * Edit a emoji in the guild * @arg {String} emojiID The ID of the emoji you want to modify * @arg {Object} options Emoji options * @arg {String} [options.name] The name of emoji * @arg {Array} [options.roles] An array containing authorized role IDs * @arg {String} [reason] The reason to be displayed in audit logs * @returns {Promise} A guild emoji object */ editEmoji(emojiID: BigString, options: { name?: string | undefined; roles?: string[] | undefined; }, reason?: string): Promise; /** Edit a guild integration */ editIntegration(integrationID: BigString, options: IntegrationOptions): Promise; /** Edit a guild member */ editMember(memberID: BigString, options: MemberOptions, reason?: string): Promise; /** Edit the guild role */ editRole(roleID: BigString, options: RoleOptions, reason?: string): Promise; /** Edit a guild sticker */ editSticker(stickerID: BigString, options: EditStickerOptions, reason?: string): Promise; /** Edit a guild template */ editTemplate(code: string, options: GuildTemplateOptions): Promise; /** Modify the guild's vanity code */ editVanity(code: string | null): Promise; /** Update a user's voice state - See [caveats](https://discord.com/developers/docs/resources/guild#modify-user-voice-state-caveats) */ editVoiceState(options: VoiceStateOptions, userID?: BigString): Promise; /** Edit the guild welcome screen */ editWelcomeScreen(options: WelcomeScreenOptions): Promise; /** Modify a guild's widget */ editWidget(options: Widget): Promise; /** Request all guild members from Discord */ fetchAllMembers(timeout?: number): Promise; /** Request specific guild members through the gateway connection */ fetchMembers(options: RequestGuildMembers): Promise; /** Get all active threads in this guild */ getActiveThreads(): Promise>; /** Get the audit log for the guild */ getAuditLog(options: GetGuildAuditLogOptions): Promise; /** Get a ban from the ban list of a guild */ getBan(userID: BigString): Promise; /** Get the ban list of the guild */ getBans(options?: GetGuildBansOptions): Promise; /** Get a guild application command */ getCommand(commandID: BigString): Promise>; /** Get the a guild's application command permissions */ getCommandPermissions(commandID: BigString): Promise; /** Get the guild's application commands */ getCommands(): Promise>; /** Get the guild's discovery object */ getDiscovery(): Promise; /** Get the all of a guild's application command permissions */ getGuildCommandPermissions(): Promise; /** Get a list of integrations for the guild */ getIntegrations(): Promise; /** Get all invites in the guild */ getInvites(): Promise; /** Get the prune count for the guild */ getPruneCount(options: GetPruneOptions): Promise; /** Get a guild's channels via the REST API. REST mode is required to use this endpoint. */ getRESTChannels(): Promise; /** Get a guild emoji via the REST API. REST mode is required to use this endpoint. */ getRESTEmoji(emojiID: BigString): Promise; /** Get a guild's emojis via the REST API. REST mode is required to use this endpoint. */ getRESTEmojis(): Promise; /** Get a guild's members via the REST API. REST mode is required to use this endpoint. */ getRESTMember(memberID: BigString): Promise; /** Get a guild's members via the REST API. REST mode is required to use this endpoint. */ getRESTMembers(options?: GetRESTGuildMembersOptions): Promise; /** Get a guild's roles via the REST API. REST mode is required to use this endpoint. */ getRESTRoles(): Promise; /** Get a guild sticker via the REST API. REST mode is required to use this endpoint. */ getRESTSticker(stickerID: BigString): Promise; /** Get a guild's stickers via the REST API. REST mode is required to use this endpoint. */ getRESTStickers(): Promise; /** Get the guild's templates */ getTemplates(): Promise; /** Returns the vanity url of the guild */ getVanity(): Promise; /** Get possible voice regions for a guild */ getVoiceRegions(): Promise; /** Get all the webhooks in the guild */ getWebhooks(): Promise; /** Get the welcome screen of the Community guild, shown to new members */ getWelcomeScreen(): Promise; /** Get a guild's widget object */ getWidget(): Promise; /** Get a guild's widget settings object */ getWidgetSettings(): Promise; /** Kick a member from the guild */ kickMember(userID: BigString, reason?: string): Promise; /** Leave the guild */ leave(): Promise; /** Get the guild permissions of a member */ permissionsOf(memberID: BigString | Member): Permission; /** Begin pruning the guild */ pruneMembers(options?: PruneMemberOptions): Promise; /** Remove a role from a guild member */ removeMemberRole(memberID: BigString, roleID: BigString, reason?: string): Promise; /** Search for guild members by partial nickname/username */ searchMembers(query: string, limit?: number): Promise; /** Force a guild integration to sync */ syncIntegration(integrationID: BigString): Promise; /** Force a guild template to sync */ syncTemplate(code: string): Promise; /** Unban a user from the guild */ unbanMember(userID: BigString, reason?: string): Promise; toJSON(props?: string[]): Record; } export default Guild; //# sourceMappingURL=Guild.d.ts.map