Simp-O-Matic

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

commit 3259c4378b8218c8ba471361b67946822a91da6f
parent 2c94e42e6000b039afba5735bf93da48b6d27064
Author: Bruno <b-coimbra@hotmail.com>
Date:   Sun, 22 Mar 2020 21:17:58 -0300

Create summon.ts
Diffstat:
Alib/commands/summon.ts | 20++++++++++++++++++++
1 file changed, 20 insertions(+), 0 deletions(-)

diff --git a/lib/commands/summon.ts b/lib/commands/summon.ts @@ -0,0 +1,20 @@ +import { FORMATS } from '../extensions'; + +export default (home_scope : HomeScope) => { + const { message, args } = 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.first().send( + `Psssst. Hey, come over to ${message.guild.name} :point-left:` + ); +};