TemplateService

Constructors

Link copied to clipboard
constructor(requestHandler: RequestHandler)

Functions

Link copied to clipboard

Create a new guild based on a template with the given code and configured by the request, returns the created guild.

inline suspend fun createGuildFromTemplate(code: String, name: String, builder: GuildFromTemplateCreateBuilder.() -> Unit): DiscordGuild

Create a new guild with a name based on a template with the given code and configured by the builder, returns the created guild.

Link copied to clipboard

Creates a template given guildId configured by request

inline suspend fun createGuildTemplate(guildId: Snowflake, name: String, builder: GuildTemplateCreateBuilder.() -> Unit): DiscordTemplate

Creates a guild template with name inside the guild with guildId configured by builder.

Link copied to clipboard
suspend fun deleteGuildTemplate(guildId: Snowflake, code: String): DiscordTemplate

Deletes a template given code and guildId.

Link copied to clipboard

Returns a DiscordTemplate from the given code.

Link copied to clipboard

Returns a list of DiscordTemplate given guildId.

Link copied to clipboard

Modifies existing guild template configured by request given code and guildId.

inline suspend fun modifyGuildTemplate(guildId: Snowflake, code: String, builder: GuildTemplateModifyBuilder.() -> Unit): DiscordTemplate

Modifies existing guild template configured by builder given code and guildId.

Link copied to clipboard
suspend fun syncGuildTemplate(guildId: Snowflake, code: String): DiscordTemplate

Synchronizes a template with code with the current state of the Guild with guildId