hide non-public command categories on help

This commit is contained in:
derpystuff 2023-07-19 00:09:37 +02:00
parent 9b98c6de95
commit aebbba9894

View file

@ -123,6 +123,7 @@ module.exports = {
for(const c of context.commandClient.commands){
if(c.name.includes(args.command.toLowerCase()) || c.aliases.filter((f)=>{return f.includes(args.command.toLowerCase())}).length >= 1){
if(c.metadata.explicit && !context.channel.nsfw) continue;
if(!categories[c.metadata.category] && !context.user.isClientOwner) continue;
resultScores[c.name] = 1
resultMappings[c.name] = c
}