Simp-O-Matic

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

commit 3ed98527d9d9b82b1eec8695aaf1b538ab9fa697
parent 38fd97969e120c9cffddc8f8dc7ac7a50944bbe9
Author: Demonstrandum <moi@knutsen.co>
Date:   Mon,  9 Mar 2020 09:09:45 +0000

Update proc

Diffstat:
MProcfile | 3++-
Mlib/main.ts | 9++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/Procfile b/Procfile @@ -1 +1,2 @@ -worker: npm start +web: echo "No web-service here, please and thank you." +service: npm start diff --git a/lib/main.ts b/lib/main.ts @@ -49,6 +49,11 @@ for (const msg of help_sections) new_messages.push(acc); const HELP_MESSAGES = new_messages; +console.log('File/Execution locations:', { + '__dirname': __dirname, + 'process.cwd()': process.cwd() +}); + @Discord export class SimpOMatic { private static _client : Client; @@ -286,8 +291,10 @@ export class SimpOMatic { } console.log('Message received:', message.content); - if (message.content[0] === CONFIG.commands.prefix) { + const trimmed = message.content.trim(); + if (trimmed[0] === CONFIG.commands.prefix) { console.log('Message type: command.') + message.content = trimmed; this.process_command(message); } else { console.log('Message type: generic.')