...
This commit is contained in:
		| @@ -12,8 +12,13 @@ class tg { | ||||
|  | ||||
|     this.client.on('message', msg => { | ||||
|       if (msg.date >= (~~(Date.now() / 1000) - 10)) { | ||||
|         msg.text = msg.text.match(/^\//g) ? msg.text.replace(/^\//g, "\.") : msg.text; | ||||
|         this.emit('data', ['message', this.reply(msg)]); | ||||
|         try { | ||||
|           msg.text = msg.text && msg.text.match(/^\//g) ? msg.text.replace(/^\//g, "\.") : msg.text; | ||||
|           this.emit('data', ['message', this.reply(msg)]); | ||||
|         } | ||||
|         catch(err) { | ||||
|           console.log(err); | ||||
|         } | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user