Class GuildTemplate

Represents a guild template.

Hierarchy

  • GuildTemplate

Constructors

  • Parameters

    Returns GuildTemplate

Properties

_cachedSourceGuild?: any
code: string

The code of the template.

createdAt: Date

When this template was created.

creator: User

The creator of this template.

description: null | string

The description of this template.

isDirty: null | boolean

If this template has unsynced changes.

name: string

The name of this template.

serializedSourceGuild: Partial<RawGuild>

A snapshot of the guild.

sourceGuildID: string

The ID of the source guild of this template.

updatedAt: Date

When this template was last updated.

usageCount: number

The amount of times this template has been used.

Accessors

  • get sourceGuild(): Guild
  • The source guild of this template. This will throw an error if the guild is not cached.

    Returns Guild

Methods

  • Create a guild from this template. This can only be used by bots in less than 10 guilds.

    Parameters

    • options: CreateGuildFromTemplateOptions

      The options for creating the guild.

    Returns Promise<Guild>

  • Delete this template.

    Returns Promise<void>

  • Edit this template.

    Parameters

    • options: EditGuildTemplateOptions

      The options for editing the template.

    Returns Promise<GuildTemplate>

  • Sync this template.

    Returns Promise<GuildTemplate>

  • Parameters

    • data: Partial<RawGuildTemplate>

    Returns void

Generated using TypeDoc