mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-03 01:10:07 +00:00
fix the bugs my nuke opened
This commit is contained in:
@@ -62,7 +62,10 @@ export async function addRole(
|
||||
botsHighestRole.id,
|
||||
roleID,
|
||||
);
|
||||
if (!hasHigherRolePosition) {
|
||||
if (
|
||||
!hasHigherRolePosition &&
|
||||
(await cacheHandlers.get("guilds", guildID))?.ownerID !== botID
|
||||
) {
|
||||
throw new Error(Errors.BOTS_HIGHEST_ROLE_TOO_LOW);
|
||||
}
|
||||
}
|
||||
@@ -93,7 +96,10 @@ export async function removeRole(
|
||||
botsHighestRole.id,
|
||||
roleID,
|
||||
);
|
||||
if (!hasHigherRolePosition) {
|
||||
if (
|
||||
!hasHigherRolePosition &&
|
||||
(await cacheHandlers.get("guilds", guildID))?.ownerID !== botID
|
||||
) {
|
||||
throw new Error(Errors.BOTS_HIGHEST_ROLE_TOO_LOW);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user