class GuildPreview
extends
Baseexport class GuildPreview extends BaseRepresents the data about the guild any bot can preview, connected to the specified guild.
approximateMemberCount : number
The approximate count of members in this guild
approximatePresenceCount : number
The approximate count of online members in this guild
readonlycreatedAt : Date
The time this guild was created at
readonlycreatedTimestamp : number
The timestamp this guild was created at
emojis : Collection<Snowflake, GuildPreviewEmoji>
Collection of emojis belonging to this guild
features : `${GuildFeature}`[]
An array of enabled guild features
id : Snowflake
The id of this guild
name : string
The name of this guild
stickers : Collection<Snowflake, Sticker>
Collection of stickers belonging to this guild
discoverySplashURL(options?: ImageURLOptions) : string | null
options?: ImageURLOptions
The URL to this guild's discovery splash.
fetch() : Promise<GuildPreview>
Fetches this guild.
iconURL(options?: ImageURLOptions) : string | null
options?: ImageURLOptions
The URL to this guild's icon.
splashURL(options?: ImageURLOptions) : string | null
options?: ImageURLOptions
The URL to this guild's splash.
toJSON() : unknown
toString() : string
When concatenated with a string, this automatically returns the guild's name instead of the Guild object.
Examples:
// Logs: Hello from My Guild!
console.log(`Hello from ${previewGuild}!`);