class GuildTemplate
extends
Baseexport class GuildTemplate extends Base
Represents the template for a guild.
readonlyClient client :
The client that instantiated this
string code :
The unique code of this template
readonlyDate createdAt :
The time when this template was created at
number createdTimestamp :
The timestamp of when this template was created at
User creator :
The user that created this template
Snowflake creatorId :
The id of the user that created this template
Snowflake guildId :
The id of the guild that this template belongs to
staticRegExp GuildTemplatesPattern :
A regular expression that matches guild template links. The code
group property is present on the exec()
result of this expression.
string name :
The name of this template
APITemplateSerializedSourceGuild serializedGuild :
The data of the guild that this template would create
readonlyDate updatedAt :
The time when this template was last synced to the guild
number updatedTimestamp :
The timestamp of when this template was last synced to the guild
readonlystring url :
The URL of this template
number usageCount :
The amount of times this template has been used
createGuildname: stringicon?: BufferResolvable | Base64Resolvable) : Promise<Guild> (
Creates a guild based on this template. This is only available to bots in fewer than 10 guilds.
deletePromise<GuildTemplate> () :
Deletes this template.
editoptions?: GuildTemplateEditOptions) : Promise<GuildTemplate> (
Updates the metadata of this template.
syncPromise<GuildTemplate> () :
Syncs this template to the current state of the guild.
toStringstring () :
When concatenated with a string, this automatically returns the template's code instead of the template object.
// Logs: Template: FKvmczH2HyUf
console.log(`Template: ${guildTemplate}!`);