Simp-O-Matic

Dumb Discord bot in TS.
git clone git://git.knutsen.co/Simp-O-Matic
Log | Files | Refs | README | LICENSE

commit a1b062a27e0854be29074396e42633fdf7552979
parent 054ad5cd4d59524c146b83be618f4756fa9a086f
Author: Fredrik <moi@knutsen.co>
Date:   Sat, 21 Mar 2020 15:55:41 +0000

Shorten alias listings.
Diffstat:
Mlib/main.ts | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/main.ts b/lib/main.ts @@ -229,9 +229,9 @@ export class SimpOMatic { if (args.length === 0 || args[0] === 'ls') { const lines = Object.keys(CONFIG.commands.aliases) - .map((e, i) => `${i + 1}. \`${p}${e}\` ↦ \`${p}${CONFIG.commands.aliases[e]}\`\n`); + .map((e, i) => `${i + 1}. \`${p}${e}\` ↦ \`${p}${CONFIG.commands.aliases[e].shorten(60)}\`\n`); message.answer('List of **Aliases**:\n'); - lines.unshift('**KEY: `Alias` ↦ `Command it maps to`**\n\n'); + lines.unshift('**KEY: `alias` ↦ `command it maps to`**\n\n'); for (const msg of glue_strings(lines)) message.channel.send(msg);