Extends
Members
approximateMemberCount :number
The approximate count of members in this guild
Type:
- number
- Source:
approximatePresenceCount :number
The approximate count of online members in this guild
Type:
- number
- Source:
(readonly) client :Client
The client that instantiated this
Type:
- Overrides:
- Source:
(nullable) description :string
The description for this guild
Type:
- string
- Source:
(nullable) discoverySplash :string
The discovery splash icon of this guild
Type:
- string
- Source:
emojis :Collection.<Snowflake, GuildPreviewEmoji>
Collection of emojis belonging to this guild
Type:
- Collection.<Snowflake, GuildPreviewEmoji>
- Source:
features :Array.<Features>
An array of enabled guild features
Type:
- Array.<Features>
- Source:
(nullable) icon :string
The icon of this guild
Type:
- string
- Source:
id :string
The id of this guild
Type:
- string
- Source:
name :string
The name of this guild
Type:
- string
- Source:
(nullable) splash :string
The splash icon of this guild
Type:
- string
- Source:
Methods
(private) _patch(data)
Builds the guild with the provided data.
Parameters:
Name | Type | Description |
---|---|---|
data |
* | The raw data of the guild |
- Source:
discoverySplashURL(optionsopt) → {string}
The URL to this guild's discovery splash.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
options |
ImageURLOptions |
<optional> |
{} | Options for the Image URL |
- Source:
Returns:
- Type
- string
fetch() → {Promise.<GuildPreview>}
Fetches this guild.
- Source:
Returns:
- Type
- Promise.<GuildPreview>
iconURL(optionsopt) → {string}
The URL to this guild's icon.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
options |
ImageURLOptions |
<optional> |
{} | Options for the Image URL |
- Source:
Returns:
- Type
- string
splashURL(optionsopt) → {string}
The URL to this guild's splash.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
options |
ImageURLOptions |
<optional> |
{} | Options for the Image URL |
- Source:
Returns:
- Type
- string
toString() → {string}
When concatenated with a string, this automatically returns the guild's name instead of the Guild object.
- Source:
Returns:
- Type
- string
Example
// Logs: Hello from My Guild!
console.log(`Hello from ${previewGuild}!`);