fix: add modifyRolePositions

This commit is contained in:
Skillz4Killz
2022-03-22 21:51:30 +00:00
committed by GitHub
parent 0d920393c4
commit 60a7ba5c11
4 changed files with 40 additions and 0 deletions
+1
View File
@@ -29,3 +29,4 @@ export default function editRole(bot: BotWithCache) {
return await editRoleOld(guildId, id, options);
};
}
@@ -0,0 +1,12 @@
import { BotWithCache } from "../../deps.ts";
import { requireBotGuildPermissions } from "../permissions.ts";
export function modifyRolePositions(bot: BotWithCache) {
const modifyRolePositionsOld = bot.helpers.modifyRolePositions;
bot.helpers.modifyRolePositions = async function (guildId, categoryId) {
requireBotGuildPermissions(bot, guildId, ["MANAGE_ROLES"]);
return await modifyRolePositionsOld(guildId, categoryId);
};
}