Open ilmenshik opened 5 years ago
Do you have a valid bot token in your config?
How to make the bot work at the start (after manage.py runserver)?
If you have added the bot token in settings.py and configured it to use webhooks, it should be enough to call manage.py runserver
. For bot polling you have to start the bot with manage.py botpolling --username=<botusername>
.
Make sure the module name (folder which contains telegrambot.py) is added to installed apps and
Every time I try to run sampleproject from the repository, the bot does not work. The application starts, but the bot does not work. If I change the code without shutting down, django will reread the files and the bot will start working.
I tried to call main() in wsgi.py, but only got an error:
list index out of range
here: https://github.com/JungDev/django-telegrambot/blob/master/django_telegrambot/apps.py#L47How to make the bot work at the start (after manage.py runserver)?