. and / as cmd
This commit is contained in:
parent
42e04f58b7
commit
8a4da4b78d
@ -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)]);
|
||||
|
Loading…
Reference in New Issue
Block a user