[Solved] Telegram Support Bot - Possible bugs?

everyone

1) When someone sends a video, the console shows an error and the bot crashes.

(node:3772) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '0' of undefined
at /home/<deducted>/telegram-support-bot/bin/ticket_handler.js:164:66
at /home/<deducted>/telegram-support-bot/bin/ticket_handler.js:210:7
at /home/<deducted>/telegram-support-bot/bin/ticket_handler.js:232:7
at process.internalTickCallback (internal/process/next_tick.js:77:7)
(node:3772) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:3772) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

2) When someone sends a document that is bigger than 19.9mb, the console shows an error and the bot crashes.

bostrot

Does this happen when a customer or one of the staff group sends a video? I am not too sure right now, but I think current limitation is that one can only send videos recorded with the Telegram photo/video button right now. I may be wrong and it is vice versa. This is because sending a video from gallery would need another file handler while the direct recording is sent as a media/video file.

About 2)

This is a limitation of the Telegram Bot API. As stated in Telegram's docs bots can only receive files of up to 20MB in size.