bostrot / telegram-support-bot

A Telegram ticketing/supporting system.
https://botspace.bostrot.com
GNU General Public License v3.0
447 stars 152 forks source link

Cannot read property 'length' of undefined #76

Closed kultpro closed 2 years ago

kultpro commented 2 years ago

Thank you very much for all the new updates! There are small errors.

  1. When the user clicks "Start" and receives the contents of "start Command Text" of any content and language, an error arrives to the admin:
An error occured, please report this to your admin:
TypeError: Cannot read property 'length' of undefined
kultpro commented 2 years ago

node --version v14.18.1

bostrot commented 2 years ago

Thanks for reporting. I have noticed those messages too but haven't had any time to look into it yet. Good to know where that comes from.

I guess this happens with the v3.x.x of the bot (master branch)? (There is no stable release for that version yet. Latest stable is v2.0.2)

kultpro commented 2 years ago

I guess this happens with the v3.x.x of the bot (master branch)? (There is no stable release for that version yet. Latest stable is v2.0.2)

Yes, "telegram-support-bot@3.0.0"

kultpro commented 2 years ago
=== UNHANDLED REJECTION ===
TypeError: Cannot read property 'length' of undefined\n" +
at /telegram-support-bot/src/index.ts:73:33\n' +
at /telegram-support-bot/node_modules/telegraf/composer.js:143:56\n' +
at processTicksAndRejections (internal/process/task_queues.js:95:5)'
kultpro commented 2 years ago

This can be used to understand how many users have used the bot, but have not created a consultation :)

bostrot commented 2 years ago

Commit dc5e207 should fix this.

kultpro commented 2 years ago

This problem is no longer there. Thanks!