Create remove_discovery_subcategory.ts

This commit is contained in:
ITOH
2021-04-20 17:01:42 +02:00
parent fcb1ed8034
commit a4f422a19a
@@ -0,0 +1,16 @@
import { rest } from "../../rest/rest.ts";
import { endpoints } from "../../util/constants.ts";
import { requireBotGuildPermissions } from "../../util/permissions.ts";
/** Removes a discovery subcategory from the guild. Requires the MANAGE_GUILD permission. Returns a 204 No Content on success. */
export async function deleteDiscoverySubcategory(
guildId: string,
categoryId: number,
) {
await requireBotGuildPermissions(guildId, ["MANAGE_GUILD"]);
return await rest.runMethod<undefined>(
"delete",
endpoints.DISCOVERY_SUBCATEGORY(guildId, categoryId),
);
}