Guild
Signature
export interface Guild extends ObjectToLower<Omit<APIGuild, 'stickers' | 'emojis' | 'roles'>>, DiscordBaseProperties
64joinedAtmemberCountlargeunavailablewebhooksmaxStickersmaxEmojistemplatesstickersmembersmoderationRulesroleschannelsemojisbansinvitesclientshardIdcreatedTimestampcreatedAtverifiedpartneredshardiddescriptionbannerpermissionsnameapplicationIdiconownerwelcomeScreensplashfeaturesverificationLevelvanityUrlCodeownerIdiconHashdiscoverySplashafkChannelIdafkTimeoutwidgetEnabledwidgetChannelIddefaultMessageNotificationsexplicitContentFiltermfaLevelsystemChannelIdsystemChannelFlagsrulesChannelIdmaxPresencesmaxMemberspremiumTierpremiumSubscriptionCountpreferredLocalepublicUpdatesChannelIdmaxVideoChannelUsersmaxStageVideoChannelUsersapproximateMemberCountapproximatePresenceCountnsfwLevelpremiumProgressBarEnabledhubTypesafetyAlertsChannelIdincidentsData
Methods
10Properties
joinedAt: StructPropState<number, State, 'create'>;memberCount: StructPropState<number, State, 'create'>;large: StructPropState<boolean, State, 'create'>;unavailable?: StructPropState<boolean, State, 'create'>;webhooks: Guild["webhooks"];maxStickersGetterget maxStickers(): MaxStickers;maxEmojisGetterget maxEmojis(): MaxEmojis;templates: Guild["templates"];stickers: Guild["stickers"];members: Guild["members"];moderationRules: Guild["moderationRules"];roles: Guild["roles"];channels: Guild["channels"];emojis: Guild["emojis"];bans: Guild["bans"];invites: Guild["invites"];readonly client: UsingClient;shardIdGetterget shardId(): number;Shard ID of the guild.
Returns
Shard ID or -1 if the client is not gateway based.
createdTimestampGetterget createdTimestamp(): number;Create a timestamp for the current object.
createdAtGetterget createdAt(): Date;createdAt gets the creation Date instace of the current object.
verifiedGetterget verified(): boolean;If the guild is verified.
partneredGetterget partnered(): boolean;shardGetterget shard(): Shard | undefined;Shard of the guild.
Returns
Shard or undefined, if the client is not gateway based always undefined.
id: string;description: string | null;banner: string | null;permissions?: string | undefined;name: string;applicationId: string | null;icon: string | null;owner?: boolean | undefined;welcomeScreen?: { description: string | null; welcomeChannels: { channelId: string; description: string; emojiId: string | null; emojiName: string | null; }[]; } | undefined;splash: string | null;features: GuildFeature[];verificationLevel: GuildVerificationLevel;vanityUrlCode: string | null;ownerId: string;iconHash?: string | null | undefined;discoverySplash: string | null;afkChannelId: string | null;afkTimeout: 1800 | 3600 | 60 | 300 | 900;widgetEnabled?: boolean | undefined;widgetChannelId?: string | null | undefined;defaultMessageNotifications: GuildDefaultMessageNotifications;explicitContentFilter: GuildExplicitContentFilter;mfaLevel: GuildMFALevel;systemChannelId: string | null;systemChannelFlags: GuildSystemChannelFlags;rulesChannelId: string | null;maxPresences?: number | null | undefined;maxMembers?: number | undefined;premiumTier: GuildPremiumTier;premiumSubscriptionCount?: number | undefined;preferredLocale: 'id' | 'en-US' | 'en-GB' | 'bg' | 'zh-CN' | 'zh-TW' | 'hr' | 'cs' | 'da' | 'nl' | 'fi' | 'fr' | 'de' | 'el' | 'hi' | 'hu' | 'it' | 'ja' | 'ko' | 'lt' | 'no' | 'pl' | 'pt-BR' | 'ro' | 'ru' | 'es-ES' | 'es-419' | 'sv-SE' | 'th' | 'tr' | 'uk' | 'vi';publicUpdatesChannelId: string | null;maxVideoChannelUsers?: number | undefined;maxStageVideoChannelUsers?: number | undefined;approximateMemberCount?: number | undefined;approximatePresenceCount?: number | undefined;nsfwLevel: GuildNSFWLevel;premiumProgressBarEnabled: boolean;hubType: GuildHubType | null;safetyAlertsChannelId: string | null;incidentsData: { invitesDisabledUntil: string | null; dmsDisabledUntil: string | null; dmSpamDetectedAt?: string | null | undefined; raidDetectedAt?: string | null | undefined; } | null;Methods
fetchOwner(force?: boolean): Promise<GuildMemberStructure | null>;listActiveThreads(force?: boolean): Promise<ThreadChannelStructure[]>;edit(body: RESTPatchAPIGuildJSONBody, reason?: string): Promise<GuildStructure<'api'>>;searchMessages(query?: RESTGetAPIGuildMessagesSearchQuery, wait?: boolean): Promise<GuildSearchMessagesResult>;fetch(mode?: 'rest' | 'flow'): Promise<GuildStructure<'cached' | 'api'>>;fetch(mode: 'cache'): ReturnCache<GuildStructure<'cached'> | undefined>;Fetch guild on API
toString(): string;Returns a string representation of an object.
leave(): Promise<void | undefined>;Leave the guild.
iconURL(options?: ImageOptions): string | undefined;iconURL gets the current guild icon.
splashURL(options?: ImageOptions): string | undefined;splashURL gets the current guild splash as a string.
Parameters
options- Image options for the splash url.
Returns
Splash url or void.
bannerURL(options?: ImageOptions): string | undefined;bannerURL gets the current guild banner as a string.
Parameters
options- Image options for the banner url.
Returns
Banner url or void