mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 17:00:08 +00:00
15 lines
455 B
TypeScript
15 lines
455 B
TypeScript
import type { Template } from "../../types/templates/template.ts";
|
|
import type { Bot } from "../../bot.ts";
|
|
|
|
/**
|
|
* Syncs the template to the guild's current state.
|
|
* Requires the `MANAGE_GUILD` permission.
|
|
*/
|
|
export async function syncGuildTemplate(bot: Bot, guildId: bigint, templateCode: string) {
|
|
return await bot.rest.runMethod<Template>(
|
|
bot.rest,
|
|
"put",
|
|
`${bot.constants.endpoints.GUILD_TEMPLATES(guildId)}/${templateCode}`,
|
|
);
|
|
}
|