From baf17e6c7691f2058ee6efab3566243309b1ed2d Mon Sep 17 00:00:00 2001 From: Keanu Date: Fri, 29 Jan 2021 00:57:50 +0100 Subject: [PATCH 1/2] Corrected usage of trimarray in info. --- src/commands/info.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/info.ts b/src/commands/info.ts index d87044f..e57e242 100644 --- a/src/commands/info.ts +++ b/src/commands/info.ts @@ -186,7 +186,7 @@ export default new Command({ roles.length < 10 ? roles.join(", ") : roles.length > 10 - ? this.client.utils.trimArray(roles) + ? trimArray(roles) : "None" }` ]); From 74d36e36b2ad1585ebb26059567086e8738c57a2 Mon Sep 17 00:00:00 2001 From: Keanu Date: Fri, 29 Jan 2021 01:15:42 +0100 Subject: [PATCH 2/2] Improved logic of role display on info. Co-authored-by: Mijyuoon --- src/commands/info.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/commands/info.ts b/src/commands/info.ts index e57e242..1a6b401 100644 --- a/src/commands/info.ts +++ b/src/commands/info.ts @@ -183,11 +183,10 @@ export default new Command({ `**❯ Server Join Date:** ${moment(member.joinedAt).format("LL LTS")}`, `**❯ Hoist Role:** ${member.roles.hoist ? member.roles.hoist.name : "None"}`, `**❯ Roles:** [${roles.length}]: ${ - roles.length < 10 - ? roles.join(", ") - : roles.length > 10 - ? trimArray(roles) - : "None" + roles.length == 0 ? "None" + : roles.length <= 10 + ? roles.join(", ") + : trimArray(roles).join(", ") }` ]); $.channel.send(embed);