From bf9ab41fcc940931a01b12bed53e6e8eb743ea3b Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sat, 25 Apr 2020 00:39:47 -0400 Subject: [PATCH] sort whois langs alphabetical order --- src/commands/whois.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/whois.ts b/src/commands/whois.ts index 00ffdd8..3c5f13f 100644 --- a/src/commands/whois.ts +++ b/src/commands/whois.ts @@ -98,7 +98,7 @@ export default class Whois extends Command { const account = await this.client.db.member.findOne({ userID: member.id }); if (account?.additional?.langs.length > 0) { const langs: string[] = []; - for (const lang of account.additional.langs) { + for (const lang of account.additional.langs.sort((a, b) => a.localeCompare(b))) { switch (lang) { case 'asm': langs.push('<:AssemblyLanguage:703448714248716442> Assembly Language');