Skip to content

Commit ac6ff15

Browse files
committed
fix(guild): Creating a template actually creates a template (#11030)
feat(guild): add creating a template
1 parent a294b47 commit ac6ff15

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/core/src/api/guild.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,16 +1287,16 @@ export class GuildsAPI {
12871287
* Creates a new template
12881288
*
12891289
* @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-template}
1290-
* @param templateCode - The code of the template
1290+
* @param guildId - The id of the guild
12911291
* @param body - The data for creating the template
12921292
* @param options - The options for creating the template
12931293
*/
12941294
public async createTemplate(
1295-
templateCode: string,
1295+
guildId: Snowflake,
12961296
body: RESTPostAPIGuildTemplatesJSONBody,
12971297
{ signal }: Pick<RequestData, 'signal'> = {},
12981298
) {
1299-
return this.rest.post(Routes.template(templateCode), { body, signal }) as Promise<RESTPostAPIGuildTemplatesResult>;
1299+
return this.rest.post(Routes.guildTemplates(guildId), { body, signal }) as Promise<RESTPostAPIGuildTemplatesResult>;
13001300
}
13011301

13021302
/**

0 commit comments

Comments
 (0)