Simp-O-Matic

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

commit 457b8991418e540dab1e7adf90065917cb898dc8
parent b5b4f159dc6dfb888b901a93e324ac2bb8603084
Author: danyisill <danyisill@users.noreply.github.com>
Date:   Thu, 19 Mar 2020 16:14:40 +0300

Create cowsay.ts and figlet.ts

Diffstat:
Alib/commands/cowsay.ts | 6++++++
Alib/commands/figlet.ts | 6++++++
2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/lib/commands/cowsay.ts b/lib/commands/cowsay.ts @@ -0,0 +1,5 @@ +import { execFileSync } from 'child_process' +export default home_scope => { + const { message, args } = home_scope + message.answer('``` \n' + execFileSync('/bin/cowsay', args) + '```') // this is safe because no shell is spawned +}+ \ No newline at end of file diff --git a/lib/commands/figlet.ts b/lib/commands/figlet.ts @@ -0,0 +1,5 @@ +import { execFileSync } from 'child_process' +export default home_scope => { + const { message, args } = home_scope + message.answer('``` \n' + execFileSync('/bin/figlet', args) + '```') // this is safe because no shell is spawned +}+ \ No newline at end of file