GuildTemplate

class GuildTemplate()

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

exported from lib.weeble.d

Properties

GuildTemplate.code

type: readonly string

The template code used to reference this template.

GuildTemplate.createdAt

type: readonly Date

When this template was created.

GuildTemplate.creatorId

type: readonly string | null

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

GuildTemplate.description

type: readonly string | null

Template description, or null.

GuildTemplate.guildId

type: readonly string

Guild ID this template was created from.

GuildTemplate.isDirty

type: readonly boolean | null

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

GuildTemplate.name

type: readonly string

Template name.

GuildTemplate.sourceGuildId

type: readonly string | null

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

GuildTemplate.updatedAt

type: readonly Date

When this template was last updated.

GuildTemplate.usageCount

type: readonly 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.