fix(guild): Creating a template actually creates a template (#11030)

feat(guild): add creating a template
This commit is contained in:
Jiralite
2025-08-04 19:46:26 +01:00
committed by GitHub
parent 8f5ac55d82
commit a2ee3932b6

View File

@@ -1322,16 +1322,16 @@ export class GuildsAPI {
* Creates a new template
*
* @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-template}
* @param templateCode - The code of the template
* @param guildId - The id of the guild
* @param body - The data for creating the template
* @param options - The options for creating the template
*/
public async createTemplate(
templateCode: string,
guildId: Snowflake,
body: RESTPostAPIGuildTemplatesJSONBody,
{ auth, signal }: Pick<RequestData, 'auth' | 'signal'> = {},
) {
return this.rest.post(Routes.template(templateCode), {
return this.rest.post(Routes.guildTemplates(guildId), {
auth,
body,
signal,