diff --git a/commands/General/permissions.js b/commands/General/permissions.js index a5f44420..d1f47689 100644 --- a/commands/General/permissions.js +++ b/commands/General/permissions.js @@ -21,22 +21,26 @@ class Permissions extends Command { async run(message) { const member = message.mentions.members.first() || message.member; - let text = "```\n" + `${message.translate("general/permissions:TITLE", { user: member.user.username, channel: message.channel.name })}\n\n`; const mPermissions = message.channel.permissionsFor(member); const total = { denied: 0, allowed: 0 }; + + let text = `${message.translate("general/permissions:TITLE", { user: member.user.username, channel: message.channel.name })}\n\n`; permissions.forEach((perm) => { + if (perm === "REQUEST_TO_SPEAK") return; + if (!mPermissions.has(perm)) { - text += `${perm} ❌\n`; + text += `${message.translate(`misc:PERMISSIONS:${perm}`)} ❌\n`; total.denied++; } else { - text += `${perm} ✅\n`; + text += `${message.translate(`misc:PERMISSIONS:${perm}`)} ✅\n`; total.allowed++; } }); - text += `\n${total.allowed} ✅ | ${total.denied} ❌` + "\n```"; + text += `\n${total.allowed} ✅ | ${total.denied} ❌`; + message.channel.send({ content: text }); diff --git a/events/messageCreate.js b/events/messageCreate.js index ae521d37..3b646642 100644 --- a/events/messageCreate.js +++ b/events/messageCreate.js @@ -145,7 +145,7 @@ module.exports = class { if (!message.channel.permissionsFor(message.member).has(perm)) neededPermissions.push(perm); }); - if (neededPermissions.length > 0) return message.error("misc:MISSING_MEMBER_PERMS", { list: neededPermissions.map((p) => `\`${message.translate(`misc:PERMISSIONS:${p.toUpperCase()}`)}\``).join(", ") }); + if (neededPermissions.length > 0) return message.error("misc:MISSING_MEMBER_PERMS", { list: neededPermissions.map((p) => `\`${message.translate(`misc:PERMISSIONS:${p}`)}\``).join(", ") }); if (!message.channel.permissionsFor(message.member).has(Permissions.FLAGS.MENTION_EVERYONE) && (message.content.includes("@everyone") || message.content.includes("@here"))) return message.error("misc:EVERYONE_MENTION"); if (!message.channel.nsfw && cmd.conf.nsfw) return message.error("misc:NSFW_COMMAND"); }