Skip to content

Commit

Permalink
more bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
KifoPL committed Jul 11, 2021
1 parent a19f490 commit 3888ac6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
18 changes: 14 additions & 4 deletions commands/management/perms.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions help.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 3888ac6

Please sign in to comment.