From 50c3c40783fcff168ded53d52aaf4c586cb9a312 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 7 Nov 2020 09:31:09 -0500 Subject: [PATCH] Update NSFW help command check --- commands/util-public/command-leaderboard.js | 2 +- commands/util-public/help.js | 5 ++--- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/commands/util-public/command-leaderboard.js b/commands/util-public/command-leaderboard.js index 3b7d3b58..f5a3edce 100644 --- a/commands/util-public/command-leaderboard.js +++ b/commands/util-public/command-leaderboard.js @@ -27,7 +27,7 @@ module.exports = class CommandLeaderboardCommand extends Command { const commands = this.filterCommands( this.client.registry.commands, this.client.isOwner(msg.author), - Boolean(msg.channel.nsfw) + msg.channel.nsfw ); const totalPages = Math.ceil(commands.size / 10); if (page > totalPages) return msg.say(`Page ${page} does not exist (yet).`); diff --git a/commands/util-public/help.js b/commands/util-public/help.js index 3a15cb82..4375c5d3 100644 --- a/commands/util-public/help.js +++ b/commands/util-public/help.js @@ -27,11 +27,10 @@ module.exports = class HelpCommand extends Command { if (!command) { const embeds = []; for (let i = 0; i < Math.ceil(this.client.registry.groups.size / 10); i++) { + const nsfw = msg.channel.nsfw && !this.client.isOwner(msg.author); const embed = new MessageEmbed() .setTitle(`Command List (Page ${i + 1})`) - .setDescription( - msg.channel.nsfw ? 'Showing NSFW Commands.' : 'Use in an NSFW channel to see NSFW commands.' - ) + .setDescription(nsfw ? '' : 'Use in an NSFW channel to see NSFW commands.') .setColor(0x00AE86); embeds.push(embed); } diff --git a/package.json b/package.json index bfa249c3..118e85a3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "119.37.5", + "version": "119.37.6", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {