From 79a0c7ae95b2843a853af20963580ca9957ca149 Mon Sep 17 00:00:00 2001 From: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com> Date: Mon, 12 Apr 2021 18:32:15 +0000 Subject: [PATCH] fix: typings for templates --- src/helpers/templates/create_guild_template.ts | 4 ++-- src/helpers/templates/edit_guild_template.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/helpers/templates/create_guild_template.ts b/src/helpers/templates/create_guild_template.ts index aafd4970d..bcb02f290 100644 --- a/src/helpers/templates/create_guild_template.ts +++ b/src/helpers/templates/create_guild_template.ts @@ -1,6 +1,6 @@ import { rest } from "../../rest/rest.ts"; import { structures } from "../../structures/mod.ts"; -import { DiscordTemplate } from "../../types/templates/template.ts"; +import { DiscordTemplate, Template } from "../../types/templates/template.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotGuildPermissions } from "../../util/permissions.ts"; @@ -12,7 +12,7 @@ import { requireBotGuildPermissions } from "../../util/permissions.ts"; */ export async function createGuildTemplate( guildId: string, - data: CreateGuildTemplate, + data: Template, ) { await requireBotGuildPermissions(guildId, ["MANAGE_GUILD"]); diff --git a/src/helpers/templates/edit_guild_template.ts b/src/helpers/templates/edit_guild_template.ts index 7ff88fabe..b1a82a0a3 100644 --- a/src/helpers/templates/edit_guild_template.ts +++ b/src/helpers/templates/edit_guild_template.ts @@ -1,5 +1,6 @@ import { rest } from "../../rest/rest.ts"; import { structures } from "../../structures/mod.ts"; +import { ModifyGuildTemplate } from "../../types/templates/modify_guild_template.ts"; import { DiscordTemplate } from "../../types/templates/template.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotGuildPermissions } from "../../util/permissions.ts"; @@ -11,7 +12,7 @@ import { requireBotGuildPermissions } from "../../util/permissions.ts"; export async function editGuildTemplate( guildId: string, templateCode: string, - data: EditGuildTemplate, + data: ModifyGuildTemplate, ) { await requireBotGuildPermissions(guildId, ["MANAGE_GUILD"]);