mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 16:57:22 +00:00
21 lines
719 B
TypeScript
21 lines
719 B
TypeScript
import type { Bot } from "../../bot.ts";
|
|
import { BigString } from "../../types/shared.ts";
|
|
|
|
/**
|
|
* Deletes a role from a guild.
|
|
*
|
|
* @param bot - The bot instance to use to make the request.
|
|
* @param guildId - The ID of the guild to delete the role from.
|
|
* @param roleId - The ID of the role to delete.
|
|
*
|
|
* @remarks
|
|
* Requires the `MANAGE_ROLES` permission.
|
|
*
|
|
* Fires a _Guild Role Delete_ gateway event.
|
|
*
|
|
* @see {@link https://discord.com/developers/docs/resources/guild#delete-guild-role}
|
|
*/
|
|
export async function deleteRole(bot: Bot, guildId: BigString, roleId: BigString): Promise<void> {
|
|
return await bot.rest.runMethod<void>(bot.rest, "DELETE", bot.constants.routes.GUILD_ROLE(guildId, roleId));
|
|
}
|