From d4760778e85a4e1a3d8d57c9333de4807437aaad Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Tue, 2 Apr 2024 09:36:03 +1100 Subject: [PATCH] ANSI-ify the pallet command --- src/commands/mp.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/commands/mp.ts b/src/commands/mp.ts index 9b6a3ed..b0ee97c 100644 --- a/src/commands/mp.ts +++ b/src/commands/mp.ts @@ -1,3 +1,4 @@ +import ansi from 'ansi-colors'; import Discord from 'discord.js'; import TClient from '../client.js'; import Logger from '../helpers/Logger.js'; @@ -105,8 +106,8 @@ export default class MP { else { const getLongestName = Object.entries(PalletLibrary(DSS)).map(([name, _])=>name.length).sort((a,b)=>b-a)[0]; await interaction.reply(MessageTool.concatMessage( - `There are currently **${filter.length}** pallets on the server. Here\'s the breakdown:\`\`\``, - Object.entries(PalletLibrary(DSS)).map(([name, count])=>`${name.padEnd(getLongestName+3)}${count}`).join('\n'), + `There are currently **${filter.length}** pallets on the server. Here\'s the breakdown:\`\`\`ansi`, + Object.entries(PalletLibrary(DSS)).map(([name, count])=>`${ansi.blue(name.padEnd(getLongestName+3))}${ansi.yellow(count.toString())}`).join('\n'), '```' )) }