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

Error when close ticket #86

Closed L4R4 closed 2 years ago

L4R4 commented 2 years ago

Describe the bug When i use command /close for close a ticket, this messaje is showing:

TypeError: Cannot read properties of null (reading '1')

I asumme that hapennig when tried to close an already closed ticket But i not sure about

bostrot commented 2 years ago

I cannot reproduce this. Please post some details on what you did to receive this error.

mte0 commented 2 years ago

hey ive got this too. on the ban command and re open command, possibly on other but im not sure

bancommand: image the error flags ln184, col 50, which is where my cursor is placed

logs:

=== UNHANDLED REJECTION ===
"Thu Oct 06 2022 11:01:33 GMT+0000 (Coordinated Universal Time): TypeError: Cannot read properties of undefined (reading 'text')\n" +
  '    at Object.banCommand (/bot/src/commands.ts:184:50)\n' +
  '    at /bot/src/index.ts:88:49\n' +
  '    at /bot/src/addons/telegram.ts:190:7\n' +
  '    at /bot/node_modules/grammy/out/composer.js:51:41\n' +
  '    at /bot/node_modules/grammy/out/composer.js:51:41\n' +
  '    at /bot/node_modules/grammy/out/composer.js:529:48\n' +
  '    at processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
  '    at async /bot/node_modules/grammy/out/composer.js:61:13\n' +
  '    at async /bot/node_modules/grammy/out/composer.js:56:9\n' +
  '    at async /bot/node_modules/grammy/out/composer.js:529:13'

and for the reopen command: image ln 223, col 50 where my cursor is, same code as in the ban command

logs

=== UNHANDLED REJECTION ===
"Thu Oct 06 2022 11:03:33 GMT+0000 (Coordinated Universal Time): TypeError: Cannot read properties of undefined (reading 'text')\n" +
  '    at Object.reopenCommand (/bot/src/commands.ts:223:50)\n' +
  '    at /bot/src/index.ts:89:52\n' +
  '    at /bot/src/addons/telegram.ts:190:7\n' +
  '    at /bot/node_modules/grammy/out/composer.js:51:41\n' +
  '    at /bot/node_modules/grammy/out/composer.js:51:41\n' +
  '    at /bot/node_modules/grammy/out/composer.js:529:48\n' +
  '    at processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
  '    at async /bot/node_modules/grammy/out/composer.js:61:13\n' +
  '    at async /bot/node_modules/grammy/out/composer.js:56:9\n' +
  '    at async /bot/node_modules/grammy/out/composer.js:529:13'

also to be clear how are we supposed to use these admin commands? by replying to a message concerning the specific ticket we want to take action on or what?

thanks for this project it seems great but more detailed docs are needed. Id love to hop on a quick call with you to show you more about this

mte0 commented 2 years ago

@bostrot