From 3888ac66d35ac370d1f3d6e066e53e996ba65203 Mon Sep 17 00:00:00 2001 From: KifoPL Date: Sun, 11 Jul 2021 18:38:18 +0200 Subject: [PATCH] more bugfixes --- commands/management/perms.js | 18 ++++++++++++++---- help.js | 4 ++-- index.js | 2 +- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/commands/management/perms.js b/commands/management/perms.js index a1ab820..bb91359 100644 --- a/commands/management/perms.js +++ b/commands/management/perms.js @@ -432,6 +432,7 @@ module.exports = { } }); IDArray.forEach((ID) => { + if (stop) return; if ( message.guild.members.resolve(ID) == null && message.guild.roles.resolve(ID) == null @@ -447,44 +448,53 @@ module.exports = { if ( mm.roles.highest.rawPosition >= message.member.roles.highest.rawPosition - ) + ) { + stop = true; return message.reply( kifo.embed( `You can't edit <@!${mm.id}>'s perms!` ) ); + } if ( mm.roles.highest.rawPosition >= message.guild.me.roles.highest.rawPosition - ) + ) { + stop = true; return message.reply( kifo.embed( `I can't edit <@!${mm.id}>'s perms!` ) ); + } } else { mm = message.guild.roles.resolve(ID); if ( mm.rawPosition >= message.member.roles.highest.rawPosition - ) + ) { + stop = true; return message.reply( kifo.embed( `You can't edit <@&${mm.id}>'s perms!` ) ); + } if ( mm.rawPosition >= message.guild.me.roles.highest.rawPosition - ) + ) { + stop = true; return message.reply( kifo.embed( `I can't edit <@&${mm.id}>'s perms!` ) ); + } } } }); + if (stop) return; // let PermsCollection = // message.channel.permissionOverwrites.filter((permOver) => // IDArray.includes(permOver.id) diff --git a/help.js b/help.js index 65b0eb3..0a32d56 100644 --- a/help.js +++ b/help.js @@ -87,7 +87,7 @@ module.exports = { .setColor("a039a0") .setTitle("List of " + i + " commands, by KifoPL:") .setFooter( - `Bot is created and developed solely by KifoPL#3358 - <@289119054130839552>. Click on the title to get an invite to bot's Discord server.` + `Bot is created and developed solely by KifoPL#3358 - <@289119054130839552>. Click on the title to get full list of commands.` ) .setURL( "https://kifopl.github.io/kifo-clanker/commandList" @@ -182,7 +182,7 @@ module.exports = { ) .setURL("https://kifopl.github.io/kifo-clanker/commandList") .setFooter( - `Bot is created and developed solely by KifoPL#3358 - <@289119054130839552>. Click on the title to get an invite to bot's Discord server.` + `Bot is created and developed solely by KifoPL#3358 - <@289119054130839552>. Click on the title to see full list of commands.` ) .addFields(FieldArr); diff --git a/index.js b/index.js index 923cd6f..d90b18b 100644 --- a/index.js +++ b/index.js @@ -122,7 +122,7 @@ async function hello(message, prefix) { .setAuthor( "Hello there (click for bot invite link)!", null, - "https://discord.com/api/oauth2/authorize?client_id=795638549730295820&permissions=76824&scope=applications.commands%20bot" + "https://discord.com/oauth2/authorize?client_id=795638549730295820&permissions=2416299088&scope=bot" ) .setColor("a039a0") .setTitle(