From a1b5e6af175f56353e6a40e4f76e5e1e4f2c33c6 Mon Sep 17 00:00:00 2001 From: Neko-Life Date: Thu, 12 Aug 2021 09:27:10 +0700 Subject: [PATCH] WTF IS AN "idAdmin"?????? --- cmds/moderation/ban.js | 4 ++-- cmds/moderation/mute.js | 4 ++-- cmds/moderation/unban.js | 4 ++-- cmds/moderation/unmute.js | 4 ++-- resources/structures.js | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cmds/moderation/ban.js b/cmds/moderation/ban.js index 19d6f56..8aacef6 100644 --- a/cmds/moderation/ban.js +++ b/cmds/moderation/ban.js @@ -26,8 +26,8 @@ module.exports = class ban extends commando.Command { */ async run(msg, arg) { const CL = msg.guild.member(msg.client.user); - if (!(msg.member.idAdmin || msg.member.hasPermission("BAN_MEMBER"))) return trySend(msg.client, msg, "bruh moment <:nekokekLife:852865942530949160>"); - if (!(CL.idAdmin || CL.hasPermission("BAN_MEMBER"))) return trySend(msg.client, msg, "I don't have the power to do that <:pepewhysobLife:853237646666891274>"); + if (!(msg.member.isAdmin || msg.member.hasPermission("BAN_MEMBER"))) return trySend(msg.client, msg, "bruh moment <:nekokekLife:852865942530949160>"); + if (!(CL.isAdmin || CL.hasPermission("BAN_MEMBER"))) return trySend(msg.client, msg, "I don't have the power to do that <:pepewhysobLife:853237646666891274>"); if (!arg) return trySend(msg.client, msg, "Args: `user_[name|mention|ID] -- [reason] -- [duration] [--d [number of days to delete messages of the user to ban]]`. Separate `user` with `,`. Example:" + `\`\`\`js\n${msg.guild.commandPrefix + this.name diff --git a/cmds/moderation/mute.js b/cmds/moderation/mute.js index 37bddbd..84955e7 100644 --- a/cmds/moderation/mute.js +++ b/cmds/moderation/mute.js @@ -65,8 +65,8 @@ module.exports = class mute extends commando.Command { */ async run(msg, arg) { const CL = msg.guild.member(msg.client.user); - if (!(msg.member.idAdmin || msg.member.hasPermission("MANAGE_ROLES"))) return trySend(msg.client, msg, "Who are you <:nekohmLife:846371737644957786>"); - if (!(CL.idAdmin || CL.hasPermission("MANAGE_ROLES"))) return trySend(msg.client, msg, "I don't have the power to do that <:pepewhysobLife:853237646666891274>"); + if (!(msg.member.isAdmin || msg.member.hasPermission("MANAGE_ROLES"))) return trySend(msg.client, msg, "Who are you <:nekohmLife:846371737644957786>"); + if (!(CL.isAdmin || CL.hasPermission("MANAGE_ROLES"))) return trySend(msg.client, msg, "I don't have the power to do that <:pepewhysobLife:853237646666891274>"); msg.channel.startTyping(); if (!msg.guild.DB) await msg.guild.dbLoad(); const MOD = msg.guild.DB.settings, diff --git a/cmds/moderation/unban.js b/cmds/moderation/unban.js index f961358..91e0686 100644 --- a/cmds/moderation/unban.js +++ b/cmds/moderation/unban.js @@ -15,8 +15,8 @@ module.exports = class unbanCmd extends commando.Command { async run(msg, arg) { const CL = msg.guild.member(msg.client.user); - if (!msg.member.idAdmin) return trySend(msg.client, msg, "are they your friend? <:nekokekLife:852865942530949160>"); - if (!CL.idAdmin) return trySend(msg.client, msg, "I don't have the power to do that <:pepewhysobLife:853237646666891274>"); + if (!msg.member.isAdmin) return trySend(msg.client, msg, "are they your friend? <:nekokekLife:852865942530949160>"); + if (!CL.isAdmin) return trySend(msg.client, msg, "I don't have the power to do that <:pepewhysobLife:853237646666891274>"); if (!arg) return trySend(msg.client, msg, "Provide `user_ID` to unban. Separate `user` with `,`. Example:```js\n" + `${msg.guild.commandPrefix + this.name} 757453290714824844, 706039105540194314, 198558078508072960 ` + `-- sent me some nice materials for tonight\`\`\``); diff --git a/cmds/moderation/unmute.js b/cmds/moderation/unmute.js index 2ebef1e..c1d5aa3 100644 --- a/cmds/moderation/unmute.js +++ b/cmds/moderation/unmute.js @@ -17,8 +17,8 @@ module.exports = class unmute extends commando.Command { async run(msg, arg) { const CL = msg.guild.member(msg.client.user); - if (!(msg.member.idAdmin || msg.member.hasPermission("MANAGE_ROLES"))) return trySend(msg.client, msg, "I refusee! <:nekohmLife:846371737644957786>"); - if (!(CL.idAdmin || CL.hasPermission("MANAGE_ROLES"))) return trySend(msg.client, msg, "I don't have the power to do that <:pepewhysobLife:853237646666891274>"); + if (!(msg.member.isAdmin || msg.member.hasPermission("MANAGE_ROLES"))) return trySend(msg.client, msg, "I refusee! <:nekohmLife:846371737644957786>"); + if (!(CL.isAdmin || CL.hasPermission("MANAGE_ROLES"))) return trySend(msg.client, msg, "I don't have the power to do that <:pepewhysobLife:853237646666891274>"); if (!msg.guild.DB) await msg.guild.dbLoad(); msg.channel.startTyping(); if (!arg) return trySend(msg.client, msg, "Provide `user_ID` to unmute. Separate `user` with `,`. Example:```js\n" + diff --git a/resources/structures.js b/resources/structures.js index 36cbaef..b9e2d6d 100644 --- a/resources/structures.js +++ b/resources/structures.js @@ -223,7 +223,7 @@ Structures.extend("User", u => { const CL = guild.member(this.client.user); if (!(CL.isAdmin || CL.hasPermission("MANAGE_ROLES")) || - !(data.moderator.idAdmin || data.moderator.hasPermission("MANAGE_ROLES"))) throw new Error("Missing Permissions"); + !(data.moderator.isAdmin || data.moderator.hasPermission("MANAGE_ROLES"))) throw new Error("Missing Permissions"); if (MEM) { if (data.moderator.roles.highest.position <= MEM.roles.highest.position || @@ -263,7 +263,7 @@ Structures.extend("User", u => { const MEM = guild.member(this); const CL = guild.member(this.client.user); if (!(CL.isAdmin || CL.hasPermission("MANAGE_ROLES")) || - !(moderator.idAdmin || moderator.hasPermission("MANAGE_ROLES"))) throw new Error("Missing Permissions"); + !(moderator.isAdmin || moderator.hasPermission("MANAGE_ROLES"))) throw new Error("Missing Permissions"); if (!guild.DB) await guild.dbLoad(); if (!this.bot) {