Base
↳ Guild
client
, data
): Guild
Initializes a new instance of the Constructor class.
Name | Type | Description |
---|---|---|
client | YorClient | The client object. |
data | APIGuild | The APIGuild data. |
Guild
YorClient
Emoji
[]
GuildFeature
[]
string
Optional
joinedTimestamp: number
GuildPremiumTier
APIGuild
Role
[]
Sticker
[]
data
): Promise
<Channel
>
Creates a channel with the given data and reason.
Name | Type | Description |
---|---|---|
data | Object | The data for creating the channel. |
data.flags? | AddUndefinedToPossiblyUndefinedPropertiesOfInterface <undefined | ChannelFlags > | - |
data.name | string | - |
data.nsfw? | AddUndefinedToPossiblyUndefinedPropertiesOfInterface <undefined | boolean > | Whether the channel is nsfw |
data.parent_id? | null | string | number | - |
data.permission_overwrites? | APIGuildCreateOverwrite [] | - |
data.position? | AddUndefinedToPossiblyUndefinedPropertiesOfInterface <undefined | number > | Sorting position of the channel |
data.reason? | string | - |
data.type? | GuildText | GuildVoice | GuildCategory | GuildAnnouncement | AnnouncementThread | PublicThread | PrivateThread | GuildStageVoice | GuildForum | GuildMedia | - |
Promise
<Channel
>
A promise that resolves when the channel is created.
name
, description?
): Promise
<APITemplate
>
Creates a template for the guild.
Name | Type | Description |
---|---|---|
name | string | The name for the template |
description? | string | The description for the template |
Promise
<APITemplate
>
data
): Promise
<Guild
>
Edits the guild with the given data.
Name | Type | Description |
---|---|---|
data | RESTPatchAPIGuildJSONBody | The data to edit the guild with. |
Promise
<Guild
>
A promise that resolves with the edited guild.
options?
): Promise
<Omit
<APIAuditLog
, "users"
> & { users
: User
[] }>
Fetches the audit logs for the API.
Name | Type | Description |
---|---|---|
options? | RESTGetAPIAuditLogQuery | Optional query parameters for the audit log request. |
Promise
<Omit
<APIAuditLog
, "users"
> & { users
: User
[] }>
A promise that resolves to the audit logs along with the users associated with the logs.
Promise
<APIGuildOnboarding
>
Fetches the onboarding data for the guild.
Promise
<APIGuildOnboarding
>
Promise
<APIGuildPreview
>
Obtains a guild preview for this guild from Discord.
Promise
<APIGuildPreview
>
Promise
<APISticker
[]>
Fetches the stickers.
Promise
<APISticker
[]>
The result of the API call.
Promise
<RESTGetAPIGuildTemplatesResult
>
Fetches the templates for the guild.
Promise
<RESTGetAPIGuildTemplatesResult
>
The result of the fetch operation.
Promise
<RESTGetAPIGuildVanityUrlResult
>
Retrieves the vanity URL of the guild.
Promise
<RESTGetAPIGuildVanityUrlResult
>
The result of the API call
Promise
<APIWebhook
[]>
Fetches the webhooks.
Promise
<APIWebhook
[]>
The webhooks.
Promise
<APIGuildWelcomeScreen
>
Fetches the welcome screen for the guild.
Promise
<APIGuildWelcomeScreen
>
A promise that resolves to the welcome screen for the guild.
Promise
<APIGuildWidget
>
Fetches the widget for the guild.
Promise
<APIGuildWidget
>
The guild widget.
Promise
<RESTGetAPIGuildIntegrationsResult
>
Retrieves the integrations for the guild.
Promise
<RESTGetAPIGuildIntegrationsResult
>
A promise that resolves with the result of the API call.
undefined
| Date
Returns the date when the user joined.
undefined
| Date
The date when the user joined, or undefined if no joined timestamp is available.
number
Calculates and returns the maximum bitrate for audio streaming based on the guild’s premium tier and features.
number
The maximum bitrate in bits per second.