mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 08:13:09 +02:00
Fix help command permission filtering
This commit is contained in:
parent
01f4bd0a13
commit
be462cea1d
@ -39,9 +39,10 @@ module.exports = class HelpCommand extends Command {
|
||||
if (cmd) {
|
||||
return await cmd.sendUsage(message.channel, args);
|
||||
} else {
|
||||
const commands = this.manager.commands.filter(async command => {
|
||||
const is_staff = await message.member.isStaff();
|
||||
const commands = this.manager.commands.filter(command => {
|
||||
if (command.permissions.length >= 1) return !message.member.hasPermission(command.permissions);
|
||||
else if (command.staff_only) return await message.member.isStaff();
|
||||
else if (command.staff_only) return is_staff;
|
||||
});
|
||||
const list = commands.map(command => {
|
||||
const description = command.description.length > 50
|
||||
|
Loading…
Reference in New Issue
Block a user