commit 8b64e973d035cb6a2bcdcdd9dc7a69610712c24c
parent 457b8991418e540dab1e7adf90065917cb898dc8
Author: danyisill <danyisill@users.noreply.github.com>
Date: Thu, 19 Mar 2020 16:20:42 +0300
return string
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/commands/cowsay.ts b/lib/commands/cowsay.ts
@@ -1,5 +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
+ message.answer('``` \n' + execFileSync('/bin/cowsay', args) + '```', {encoding: 'utf8'}) // 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
@@ -1,5 +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
+ message.answer('``` \n' + execFileSync('/bin/figlet', args) + '```', {encoding: 'utf8'}) // this is safe because no shell is spawned
}
\ No newline at end of file