Skip to content

Commit

Permalink
Update message.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Laxuzer authored Apr 23, 2022
1 parent ae73f46 commit c067c39
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/events/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,26 @@ module.exports = class MessageEvent extends Event {
if (cmd.permissions) {
if (cmd.permissions.bot) {
if (cmd.permissions.bot.channel) {
if (!cmd.permissions.bot.channel.some(a => message.channel.permissionFor(message.guild.me).hasPermission(a))) {
if (!cmd.permissions.bot.channel.some(a => message.channel.permissionsFor(message.guild.me).has(a))) {
passed.push('botChannel');
};
};
if (cmd.permissions.bot.guild) {
if (!cmd.permissions.bot.channel.some(a => message.guild.me.hasPermission(a))) {
if (!cmd.permissions.bot.channel.some(a => message.guild.me.permissions.has(a))) {
passed.push('botGuild');
};
};
};

if (cmd.permissions.member) {
if (cmd.permissions.member.guild) {
if (!cmd.permissions.member.guild.some(a => message.member.hasPermission(a))) {
if (!cmd.permissions.member.guild.some(a => message.member.permissions.has(a))) {
passed.push('mGuild');
};
};

if (cmd.permissions.member.channel) {
if (!cmd.permissions.member.channel.some(a => message.channel.permissionFor(message.member).hasPermission(a))) {
if (!cmd.permissions.member.channel.some(a => message.channel.permissionsFor(message.member).has(a))) {
passed.push('mChannel');
};
};
Expand Down

0 comments on commit c067c39

Please sign in to comment.