GuildTemplate
GuildTemplate ⇐ Base
Represents a guild template.
Kind: global class
Extends: Base
- GuildTemplate ⇐
Base
- new GuildTemplate([data], client)
- .guild ⇒
- .fetch() ⇒
Promise
- .sync() ⇒
Promise.<void>
- .edit(options) ⇒
Promise
- .delete() ⇒
Promise.<void>
- .setName(name) ⇒
Promise
- .setDescription(description) ⇒
Promise
- .createGuild(options) ⇒
Promise
new GuildTemplate([data], client)
Constructs a new instance of a data object.
Param | Type | Description |
---|---|---|
[data] | Object | The data for the guild template. |
client | Client | The client instance. |
guildTemplate.guild ⇒
Get the guild object associated with this guild ID.
Kind: instance property of GuildTemplate
Returns: The guild object.
guildTemplate.fetch() ⇒ Promise
Fetches a guild template using the provided code.
Kind: instance method of GuildTemplate
Returns: Promise
- A promise that resolves to the fetched guild template.
guildTemplate.sync() ⇒ Promise.<void>
Synchronizes the guild templates with the provided code.
Kind: instance method of GuildTemplate
Returns: Promise.<void>
- - A promise that resolves when the synchronization is complete.
guildTemplate.edit(options) ⇒ Promise
Edits the guild template with the provided options.
Kind: instance method of GuildTemplate
Returns: Promise
- A promise that resolves to the result of the template edit.
Param | Type | Description |
---|---|---|
options | Object | The options to apply to the template edit. |
guildTemplate.delete() ⇒ Promise.<void>
Deletes the template with the specified code from the guild.
Kind: instance method of GuildTemplate
Returns: Promise.<void>
- A promise that resolves when the template is successfully deleted.
guildTemplate.setName(name) ⇒ Promise
Sets the name of an object asynchronously.
Kind: instance method of GuildTemplate
Returns: Promise
- A promise that resolves when the name is successfully set.
Param | Type | Description |
---|---|---|
name | string | The new name to set. |
guildTemplate.setDescription(description) ⇒ Promise
Sets the description of an object and updates it.
Kind: instance method of GuildTemplate
Returns: Promise
- - A promise that resolves when the description is successfully updated.
Param | Type | Description |
---|---|---|
description | string | The new description to set. |
guildTemplate.createGuild(options) ⇒ Promise
Creates a new guild using the provided options.
Kind: instance method of GuildTemplate
Returns: Promise
- A promise that resolves to the generated template for the guild.
Param | Type | Description |
---|---|---|
options | Object | The options for creating the guild. |