mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 19:28:17 +00:00
Create remove_discovery_subcategory.ts
This commit is contained in:
@@ -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),
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user