Update NSFW help command check

This commit is contained in:
Dragon Fire
2020-11-07 09:31:09 -05:00
parent c138db3950
commit 50c3c40783
3 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -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).`);
+2 -3
View File
@@ -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);
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "119.37.5",
"version": "119.37.6",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {