-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sending message with bot #18
Comments
You may just obtain a bot from DjangoTelegramBot.getBot() method. example how use a bot in a views:
|
I use this part of code in celery periodic task:
But i see only this error: |
I see this error too: |
It means that the first line does not return a valid bot object. The required settings (i.e. token) must be defined in djangos settings.py and you have to make sure, that this settings are loaded, when the script is called from something else than django/wsgi. The 'bot_name' string need to be replaced with the bots user name (not display name!), which belongs to the token given in settings.py. |
How to send message with bot without handler in this package?!
something just like this: bot.sendmessage().... bot out of any def!
The text was updated successfully, but these errors were encountered: