mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-18 01:07:22 +00:00
17 lines
422 B
TypeScript
17 lines
422 B
TypeScript
import { BotWithCache } from "../../deps.ts";
|
|
import { requireBotGuildPermissions } from "../permissions.ts";
|
|
|
|
export default function createRole(bot: BotWithCache) {
|
|
const createRoleOld = bot.helpers.createRole;
|
|
|
|
bot.helpers.createRole = function (
|
|
guildId,
|
|
options,
|
|
reason,
|
|
) {
|
|
requireBotGuildPermissions(bot, guildId, ["MANAGE_ROLES"]);
|
|
|
|
return createRoleOld(guildId, options, reason);
|
|
};
|
|
}
|