Skip to content

GuildTemplate

Represents a guild template.

Kind: global class
Extends: Base

Constructs a new instance of a data object.

ParamTypeDescription
[data]ObjectThe data for the guild template.
clientClientThe client instance.

Get the guild object associated with this guild ID.

Kind: instance property of GuildTemplate
Returns: The guild object.

Fetches a guild template using the provided code.

Kind: instance method of GuildTemplate
Returns: Promise - A promise that resolves to the fetched guild template.

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.

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.

ParamTypeDescription
optionsObjectThe options to apply to the template edit.

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.

Sets the name of an object asynchronously.

Kind: instance method of GuildTemplate
Returns: Promise - A promise that resolves when the name is successfully set.

ParamTypeDescription
namestringThe new name to set.

guildTemplate.setDescription(description) ⇒ Promise

Section titled “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.

ParamTypeDescription
descriptionstringThe new description to set.

guildTemplate.createGuild(options) ⇒ Promise

Section titled “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.

ParamTypeDescription
optionsObjectThe options for creating the guild.