class GuildPreview

extends

Base
export class GuildPreview extends Base

Represents 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

readonly
client : Client<true>

The client that instantiated this

Inherited from: Base

readonly
createdAt : Date

The time this guild was created at

readonly
createdTimestamp : number

The timestamp this guild was created at

description : string | null

The description for this guild

discoverySplash : string | null

The discovery splash icon of this guild

Collection of emojis belonging to this guild

features : `${GuildFeature}`[]

An array of enabled guild features

icon : string | null

The icon of this guild

The id of this guild

name : string

The name of this guild

splash : string | null

The splash icon of this guild

Collection of stickers belonging to this guild

discoverySplashURL(
options?: ImageURLOptions
) : string | null

The URL to this guild's discovery splash.

fetch() : Promise<GuildPreview>

Fetches this guild.

iconURL(
options?: ImageURLOptions
) : string | null

The URL to this guild's icon.

splashURL(
options?: ImageURLOptions
) : string | null

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}!`);

valueOf() : string

Inherited from: Base