mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-10 19:04:42 +02:00
Update NSFW help command check
This commit is contained in:
@@ -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).`);
|
||||
|
||||
@@ -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
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "119.37.5",
|
||||
"version": "119.37.6",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user