node-telegram-bot-api-tutorial icon indicating copy to clipboard operation
node-telegram-bot-api-tutorial copied to clipboard

Is relocating of event listeners available?

Open NEK-RA opened this issue 4 years ago • 0 comments

Shortly: Is it possible to move bot.onText and others bot.on event listeners to another JS file? Making some structure, when few related commands(even listeners) will be placed in one file, and another few - in another file, and finally include these commands into main script where bot initialized with something like mybot.useCommands(ModuleWithCommands1, Module2, Module3) ?

Full question is on StackOverflow: https://stackoverflow.com/questions/64318854/how-to-split-long-list-of-commands-to-different-files

NEK-RA avatar Oct 12 '20 13:10 NEK-RA