GuildTemplate

GuildTemplate

Represents a guild template

Constructor

new GuildTemplate()

Properties:
Name Type Attributes Description
code String

The template code

createdAt Number

Timestamp of template creation

creator User

User that created the template

description String <nullable>

The template description

isDirty Boolean <nullable>

Whether the template has unsynced changes

name String

The template name

serializedSourceGuild Guild

The guild snapshot this template contains

sourceGuild Guild | Object

The guild this template is based on. If the guild is not cached, this will be an object with id key. No other property is guaranteed

updatedAt Number

Timestamp of template update

usageCount Number

Number of times this template has been used

Source:

Methods

delete() → {Promise.<GuildTemplate>}

Delete this template

Source:
Returns:
Type:
Promise.<GuildTemplate>

edit(options) → {Promise.<GuildTemplate>}

Edit this template

Source:
Parameters:
Name Type Description
options Object

The properties to edit

Name Type Attributes Description
description String <optional>
<nullable>

The description for the template. Set to null to remove the description

name String <optional>

The name of the template

Returns:
Type:
Promise.<GuildTemplate>

sync() → {Promise.<GuildTemplate>}

Force this template to sync to the guild's current state

Source:
Returns:
Type:
Promise.<GuildTemplate>