Simp-O-Matic

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

commit f56382979be4f087f4fb251faa6b82f23b3d7476
parent 71706cd8541486bb20ac3e66f93b233e407834bb
Author: Demonstrandum <moi@knutsen.co>
Date:   Mon, 23 Mar 2020 00:43:26 +0000

Use help message.

Diffstat:
Mlib/commands/summon.ts | 18++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/lib/commands/summon.ts b/lib/commands/summon.ts @@ -1,20 +1,14 @@ -import { FORMATS } from '../extensions'; +import { help_info } from '../utils'; export default (home_scope : HomeScope) => { - const { message, args } = home_scope; + const { message, args, CONFIG } = home_scope; if (args.length === 0 || args[0] === 'help' - || message.mentions.users.size == 0) { - message.answer( - "Poke someone and I'll summon them over here!\n" - .format(FORMATS.italics) + - ".summon [@user-name]" - .format(FORMATS.block) - ); - return; - } + || message.mentions.users.size === 0) + return message.reply(help_info('summon', CONFIG.commands.prefix)); message.mentions.users.first().send( - `Psssst. Hey, come over to ${message.guild.name} :point-left:` + `Psssst. Hey, come over to ${message.guild.name} :point_left:\n` + + `(${message.member.user.tag} is trying to summon you).` ); };