From 7fd95aa586b2e42b7d9cca198471539e1e975aa7 Mon Sep 17 00:00:00 2001 From: Hiroyuki Date: Sun, 12 Sep 2021 21:31:31 -0400 Subject: [PATCH] fix: detailed help command permissions --- src/commands/help.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/help.ts b/src/commands/help.ts index 26fe008..2f2ca2b 100644 --- a/src/commands/help.ts +++ b/src/commands/help.ts @@ -46,9 +46,9 @@ export default class Help extends Command { if (!resolved) return message.channel.send(`${this.client.stores.emojis.error} **Command not found!**`); const { cmd } = resolved; const perms: string[] = []; - let allowedRoles = cmd.permissions && cmd.permissions.roles && cmd.permissions.roles.map((r) => r.toString()).join(', '); + let allowedRoles = cmd.permissions && cmd.permissions.roles && cmd.permissions.roles.map((r) => `<@&${r}>`).join(', '); if (allowedRoles) { allowedRoles = `**Roles:** ${allowedRoles}`; perms.push(allowedRoles); } - let allowedUsers = cmd.permissions && cmd.permissions.users && cmd.permissions.users.map((u) => u.toString()).join(', '); + let allowedUsers = cmd.permissions && cmd.permissions.users && cmd.permissions.users.map((u) => `<@!${u}>`).join(', '); if (allowedUsers) { allowedUsers = `**Users:** ${allowedUsers}`; perms.push(allowedUsers); } const displayedPerms = perms.length ? `\n**Permissions:**\n${perms.join('\n')}` : ''; const aliases = cmd.aliases.length ? `\n**Aliases:** ${cmd.aliases.map((alias) => `${this.client.config.prefix}${cmd.parentName ? `${cmd.parentName} ` : ''}${alias}`).join(', ')}` : '';