robot-mafia / nestjs-telegraf

🤖 Powerful Nest module for easy and fast creation Telegram bots
https://nestjs-telegraf.0x467.com
MIT License
508 stars 87 forks source link

Incorrect bot shutdown #1079

Open armpogart opened 1 year ago

armpogart commented 1 year ago

I'm using nestjs-console package and I have separate cli entrypoint for commands. That entrypoint initialized application and closes it at the end similar to example below. image

And each close call causes Error: Bot is not running on following line: https://github.com/hypeertech/nestjs-telegraf/blob/0781837c19be463f3dc924c78327cd229c865081/lib/telegraf-core.module.ts#L120

So is there anyway to add a check there whether the bot is running before stopping it, so that my cli process have correct exit code during CI instead of having error every time due to this?

mvn-h24 commented 4 months ago

Got this error too. Im using Both Api to send notifications in many apps which may starts at one time, so i set launchOptions: false, but now at app stop throws this exception. May be the Module will catch this exception?

alex4506 commented 3 months ago

+1