From 8a4da4b78d782ad869273230d47c9dd6cbd8df5b Mon Sep 17 00:00:00 2001 From: Flummi Date: Fri, 10 Nov 2017 10:21:32 +0100 Subject: [PATCH] . and / as cmd --- src/inc/clients/tg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inc/clients/tg.js b/src/inc/clients/tg.js index 358b071..b075404 100644 --- a/src/inc/clients/tg.js +++ b/src/inc/clients/tg.js @@ -10,7 +10,7 @@ class tg { this.options.polling = options.polling || true; this.client = new tgapi(this.options.token, this.options); - this.client.onText(/.*/, msg => { + this.client.on('message', msg => { if (msg.date >= (~~(Date.now() / 1000) - 10)) { msg.text = msg.text.replace(/^\//g, "\."); this.emit('data', ['message', this.reply(msg)]);