Naltox / telegram-node-bot

Node module for creating Telegram bots.
MIT License
720 stars 144 forks source link

TypeError: Cannot read property 'toString' of undefined #210

Closed Soba101 closed 3 years ago

Soba101 commented 3 years ago

I have been stuck on this for quite some time. Tried to research on what is wrong but can't figure out why. This is my first time trying to built a bot.

TypeError: Cannot read property 'toString' of undefined at TelegramBot.<anonymous> (C:\Users\Donovan\Documents\GitHub\node_telegram_javascript\app.js:28:18) at TelegramBot.emit (C:\Users\Donovan\Documents\GitHub\node_telegram_javascript\node_modules\eventemitter3\index.js:182:35) at TelegramBot.processUpdate (C:\Users\Donovan\Documents\GitHub\node_telegram_javascript\node_modules\node-telegram-bot-api\src\telegram.js:634:12) at C:\Users\Donovan\Documents\GitHub\node_telegram_javascript\node_modules\node-telegram-bot-api\src\telegramPolling.js:110:22 at Array.forEach (<anonymous>) at C:\Users\Donovan\Documents\GitHub\node_telegram_javascript\node_modules\node-telegram-bot-api\src\telegramPolling.js:106:17 at tryCatcher (C:\Users\Donovan\Documents\GitHub\node_telegram_javascript\node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (C:\Users\Donovan\Documents\GitHub\node_telegram_javascript\node_modules\bluebird\js\release\promise.js:547:31) at Promise._settlePromise (C:\Users\Donovan\Documents\GitHub\node_telegram_javascript\node_modules\bluebird\js\release\promise.js:604:18) at Promise._settlePromise0 (C:\Users\Donovan\Documents\GitHub\node_telegram_javascript\node_modules\bluebird\js\release\promise.js:649:10) at Promise._settlePromises (C:\Users\Donovan\Documents\GitHub\node_telegram_javascript\node_modules\bluebird\js\release\promise.js:729:18) at _drainQueueStep (C:\Users\Donovan\Documents\GitHub\node_telegram_javascript\node_modules\bluebird\js\release\async.js:93:12) at _drainQueue (C:\Users\Donovan\Documents\GitHub\node_telegram_javascript\node_modules\bluebird\js\release\async.js:86:9) at Async._drainQueues (C:\Users\Donovan\Documents\GitHub\node_telegram_javascript\node_modules\bluebird\js\release\async.js:102:5) at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\Donovan\Documents\GitHub\node_telegram_javascript\node_modules\bluebird\js\release\async.js:15:14) at processImmediate (node:internal/timers:464:21)