diff --git a/commands/random-res/suggest-command.js b/commands/random-res/suggest-command.js index a4a027d8..f694bb5d 100644 --- a/commands/random-res/suggest-command.js +++ b/commands/random-res/suggest-command.js @@ -13,7 +13,15 @@ module.exports = class SuggestCommandCommand extends Command { } run(msg) { - const command = this.client.registry.commands.random(); + const command = this.client.registry.commands + .filter(cmd => { + if (cmd.hidden || cmd.unknown) return false; + if (!msg.channel.nsfw && cmd.nsfw) return false; + if (!this.client.isOwner(msg.author) && cmd.ownerOnly) return false; + if (!msg.guild && cmd.guildOnly) return false; + return true; + }) + .random(); return msg.say(stripIndents` Have you tried **${command.name}**? _${command.description}_ diff --git a/package.json b/package.json index b0d2b4a7..dddf8371 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "116.1.0", + "version": "116.1.1", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {