Skip to content

GuildPreview

classe · Source

Represents the data about the guild any bot can preview, connected to the specified guild.

Extends: Base

Properties

id

id: string

The id of this guild Source

name

name: string

The name of this guild Source

icon

nullable

icon: string

The icon of this guild Source

splash

nullable

splash: string

The splash icon of this guild Source

discoverySplash

nullable

discoverySplash: string

The discovery splash icon of this guild Source

features

features: Array<Features>

An array of enabled guild features Source

approximateMemberCount

approximateMemberCount: number

The approximate count of members in this guild Source

approximatePresenceCount

approximatePresenceCount: number

The approximate count of online members in this guild Source

description

nullable

description: string

The description for this guild Source

emojis

emojis: Collection<Snowflake, GuildPreviewEmoji>

Collection of emojis belonging to this guild Source

stickers

stickers: Collection<Snowflake, Sticker>

Collection of stickers belonging to this guild Source

createdTimestamp

readonly

createdTimestamp: number

The timestamp this guild was created at Source

createdAt

readonly

createdAt: Date

The time this guild was created at Source

client

readonly

client: Client

The client that instantiated this Source

Methods

splashURL

splashURL(options?: StaticImageURLOptions): string

The URL to this guild's splash. Parameters

NameTypeDescription
options?StaticImageURLOptionsOptions for the Image URL Default: {}.

Returns: stringSource

discoverySplashURL

discoverySplashURL(options?: StaticImageURLOptions): string

The URL to this guild's discovery splash. Parameters

NameTypeDescription
options?StaticImageURLOptionsOptions for the Image URL Default: {}.

Returns: stringSource

iconURL

iconURL(options?: ImageURLOptions): string

The URL to this guild's icon. Parameters

NameTypeDescription
options?ImageURLOptionsOptions for the Image URL Default: {}.

Returns: stringSource

fetch

async

async fetch(): Promise<GuildPreview>

Fetches this guild. Returns: Promise<GuildPreview>Source

toString

toString(): string

When concatenated with a string, this automatically returns the guild's name instead of the Guild object. Returns: string

js
// Logs: Hello from My Guild!
console.log(`Hello from ${previewGuild}!`);

Source

Unofficial software. Not affiliated with or supported by Discord.