Help me with telegram bot

Why doesn’t my bot respond to inline commands?
Is it possible to make a program run forever even if you log out of the application?

In order for your code to work forever, you need to use deployments. Specifically for bots, you need to use the Reserved VM, since it does not turn off. Reserved VM costs from $7 per month.