mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-03 01:10:07 +00:00
16 lines
392 B
TypeScript
16 lines
392 B
TypeScript
import { BotWithCache } from "../../deps.ts";
|
|
import { requireBotGuildPermissions } from "../permissions.ts";
|
|
|
|
export default function deleteRole(bot: BotWithCache) {
|
|
const deleteRoleOld = bot.helpers.deleteRole;
|
|
|
|
bot.helpers.deleteRole = function (
|
|
guildId,
|
|
id,
|
|
) {
|
|
requireBotGuildPermissions(bot, guildId, ["MANAGE_ROLES"]);
|
|
|
|
return deleteRoleOld(guildId, id);
|
|
};
|
|
}
|