mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
types: fix new types issues (#829)
* feat: add tests for deleting channel overwrites * fix: typings
This commit is contained in:
@@ -2,6 +2,7 @@ import { rest } from "../../rest/rest.ts";
|
||||
import { structures } from "../../structures/mod.ts";
|
||||
import { endpoints } from "../../util/constants.ts";
|
||||
import { requireBotGuildPermissions } from "../../util/permissions.ts";
|
||||
import { DiscordTemplate } from "../../types/templates/template.ts";
|
||||
|
||||
/**
|
||||
* Returns an array of templates.
|
||||
@@ -12,8 +13,8 @@ export async function getGuildTemplates(guildId: string) {
|
||||
|
||||
const templates = (await rest.runMethod(
|
||||
"get",
|
||||
endpoints.GUILD_TEMPLATES(guildId),
|
||||
)) as GuildTemplate[];
|
||||
endpoints.GUILD_TEMPLATES(guildId)
|
||||
)) as DiscordTemplate[];
|
||||
|
||||
return templates.map((template) => structures.createTemplateStruct(template));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user