This group is for questions, answers and discussions around the python-telegram-bot library. Off-topic group: @pythontelegrambottalk | Website: https://python-telegram-bot.org
there are a lot of different options to achieve this and which one you pick depends on your use case. Note that this is not a ptb-specific problem but a rather generic python question. there are also some notes on this in +running alongside+ iirc !search
Читать полностью…Wiki of python-telegram-bot - Category Notable Features
Bot API Forward Compatiblity
that wouldn't make any difference, I guess. The point is that between start
and stop
ye need something that prevents python from directly jumping to stop()
.
telegram api 7.0 how much left to release with this ptb library send the link
Читать полностью…https://pastebin.com/0mZLtAxb
1st one work perfect .
2 nd : bot stopped with in a sec.
What's wrong ?
I'm using 20.7 , but I haven't used from a long time so my information are old a bit
Читать полностью…updater.start_polling()
updater.idle()
I've wrote that code it suppos to run the application until I stops it but It won't
/channel/pythontelegrambotgroup/718468
I could say I told you so 😜
ext.Application.run_polling
python-telegram-bot documentation for this method:
telegram.ext.Application.run_polling
Can anyone remind me of that command makes bot wait until massages, not turned off immediately
Читать полностью…Please don't spam the group with searches or commands, and go to a private chat with me instead. Thanks a lot, the other members will appreciate it 😊
Читать полностью…Hey. You can find our documentation at Read the Docs.
Читать полностью…after calling bot.log_out()
how do I use it again? It will work after 10 mins right?
That's what I can't understand :(
If me try like this start()
await asyncio.Future() # endless wait
stop()
Bot started but Didn't take any cmd
Likeasyncio.get_event_loop().run_until_complete(main())
?
you call stop()
directly after calling start()
… you'll have to keep the hevent loop running until you want to shut down the bot
telegram.Bot.send_message(..., message_thread_id=...)
python-telegram-bot documentation for this parameter of telegram.Bot.send_message:
message_thread_id
Hey. You seem to be using the new version (>=20.0) of python-telegram-bot
but your code is written for an older and deprecated version (<=13.15).
Please update your code to the new v20 by reading the release notes and the transition guide linked below.
You can also install a version of PTB that is compatible with your code base, but please note that the library has undergone significant changes in v20 and the older version is not supported anymore. It may contain bugs that will not be fixed by the PTB team and it also doesn't support new functions added by newer Bot API releases.
Hey. You seem to be using a version <=13.15 of python-telegram-bot
. Please note that we only provide support for the latest stable version and that the library has undergone significant changes in v20. Please consider upgrading to v20 by reading the release notes and the transition guide linked below.
Yes, telegram.ext.Application.shutdown updates the persistence
Читать полностью…general question, the PicklePersistance
work by snapshotting it into file periodically right. So is there a snapshot when I close the bot?
try:Читать полностью…
Application.run()
except: —-
finally:
# snapshots here again right?
Please don't spam the group with searches or commands, and go to a private chat with me instead. Thanks a lot, the other members will appreciate it 😊
Читать полностью…probably pip is installing in other python version and you are running script with other python version.
always use python -m pip install instead of pip install