GuildTemplate

class GuildTemplate

A reusable snapshot of a guild’s channels, roles, and settings.

Properties

Property

Type

Description

code

string

The template code used to reference this template.

createdAt

Date

When this template was created.

creatorId

string | null

ID of the user who created this template, or null.

description

string | null

Template description, or null.

guildId

string

Guild ID this template was created from.

isDirty

boolean | null

Indicates whether the template is out of sync with the source guild, or null.

name

string

Template name.

sourceGuildId

string | null

Source guild ID (for synced templates), or null.

updatedAt

Date

When this template was last updated.

usageCount

number

Number of times this template has been used.

Methods

async GuildTemplate.delete() → Promise<GuildTemplate>

Delete this template.

Returns:

The deleted template object.

async GuildTemplate.edit(options: { description?: string | null; name?: string; }) → Promise<GuildTemplate>

Edit template properties.

Parameters:
  • options: Template properties to update.

Returns:

The updated template.

async GuildTemplate.sync() → Promise<GuildTemplate>

Replace this template’s snapshot with the current guild state. This does not apply the template to the guild.

Returns:

The updated template.