Simp-O-Matic

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

commit 87b0223f32dafcbf0b943f6dd54274a8c8fcffa5
parent 60e2bd0a477585c93a428d170a359123c73bc2d2
Author: Demonstrandum <moi@knutsen.co>
Date:   Thu, 19 Mar 2020 15:07:20 +0000

Merge branch 'master' of github.com:Demonstrandum/Simp-O-Matic

Diffstat:
Mlib/commands/cowsay.ts | 4++--
Mlib/commands/cowthink.ts | 4++--
Mlib/commands/figlet.ts | 4++--
Mlib/commands/mock.ts | 2+-
4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/lib/commands/cowsay.ts b/lib/commands/cowsay.ts @@ -1,8 +1,8 @@ -import { execFileSync as exec } from 'child_process' +import { execFileSync as exec_file_sync } from 'child_process' export default home_scope => { const { message, args } = home_scope; // This is safe because no shell is spawned: - message.answer(exec('./node_modules/.bin/cowsay', args, { + message.answer(exec_file_sync('./node_modules/.bin/cowsay', args, { encoding: 'utf8', cwd: process.cwd() }).format('```')); diff --git a/lib/commands/cowthink.ts b/lib/commands/cowthink.ts @@ -1,8 +1,8 @@ -import { execFileSync as exec } from 'child_process' +import { execFileSync as exec_file_sync } from 'child_process' export default home_scope => { const { message, args } = home_scope; // This is safe because no shell is spawned: - message.answer(exec('./node_modules/.bin/cowthink', args, { + message.answer(exec_file_sync('./node_modules/.bin/cowthink', args, { encoding: 'utf8', cwd: process.cwd() }).format('```')); diff --git a/lib/commands/figlet.ts b/lib/commands/figlet.ts @@ -1,8 +1,8 @@ -import { execFileSync as exec } from 'child_process' +import { execFileSync as exec_file_sync } from 'child_process' export default home_scope => { const { message, args } = home_scope; // This is safe because no shell is spawned: - message.answer(exec('./node_modules/.bin/figlet', args, { + message.answer(exec_file_sync('./node_modules/.bin/figlet', args, { encoding: 'utf8', cwd: process.cwd() }).format('```')); diff --git a/lib/commands/mock.ts b/lib/commands/mock.ts @@ -7,5 +7,5 @@ export default home_scope => { return l else return (b = !b)?l.toUpperCase():l - }).join() || 'sAy SoMeThInG wIlL yA?') + }).join('') || 'sAy SoMeThInG wIlL yA?') } \ No newline at end of file