Skip to content

GuildTemplate

GuildTemplate ⇐ Base

Represents a guild template.

Kind: global class
Extends: Base

new GuildTemplate([data], client)

Constructs a new instance of a data object.

ParamTypeDescription
[data]ObjectThe data for the guild template.
clientClientThe 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.

ParamTypeDescription
optionsObjectThe 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.

ParamTypeDescription
namestringThe 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.

ParamTypeDescription
descriptionstringThe 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.

ParamTypeDescription
optionsObjectThe options for creating the guild.