Don't process messages without a text

This commit is contained in:
Mahdi Dibaiee
2015-07-07 03:13:33 +04:30
parent 5c36581e08
commit bdfd4ee99d
3 changed files with 6 additions and 1 deletions

View File

@ -196,7 +196,10 @@ var Bot = (function (_EventEmitter) {
}
update.forEach(function (res) {
console.log(res);
var text = res.message.text;
if (!text) return;
var selfUsername = '@' + _this2.info.username;
if (text.startsWith('/') && text.indexOf(selfUsername) > -1) {