mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
fix: add modifyRolePositions
This commit is contained in:
@@ -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);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user