10206
This group is for questions, answers and discussions around the python-telegram-bot library. Off-topic group: @pythontelegrambottalk | Website: https://python-telegram-bot.org
def delete_message_schedule(chat_id, msg_id, token):
try:
job = Job(
callback=delete_message,
when=10,
data=(chat_id, msg_id, token),
name="delete_message"
)
scheduler.run_once(job)
except Exception as e:
print(f"Error: {e}")
don't now why i was not getting a single update from these
revoked token worked 1
There is no way to bypass rate limits - that would be kind of stupid;P
TG has it's one setup for native games - see +send_game+ and also for so-called mini apps/web apps - see +webappbot+. Both are basically integrations of html websites into TG. These might be useful for you. !search
Hey. You can find our documentation at Read the Docs.
Читать полностью…
just took a moment to build the documentation for the new versino :)
Читать полностью…
not that that's the only thing you have to do
Читать полностью…
Yeah no just adding async is not going to cut it
Maybe for simple bots
We’ve just released v20.7.
Thank you to everyone who contributed to this release.
As usual, upgrade using pip install -U python-telegram-bot.
This release brings support for socket options, a filter for mentions and separate handling of write_timeout for media methods as new features. Moreover, inconsistencies in the handling of the read_timeout parameter for get_updates were fixed.
⚠️ Note that the changes related to timeout behavior come with some deprecations. Please pay attention to the warnings that PTB issues, especially if you have a custom implementation of the BaseRequest class.
For the full list of changes and improvements, please see the below changelog.
New Features
• Add JobQueue.scheduler_configuration and Corresponding Warnings (#3913 closes #3837)
• Add Parameter socket_options to HTTPXRequest (#3935 closes #2965)
• Add ApplicationBuilder.(get_updates_)socket_options (#3943)
• Improve write_timeout Handling for Media Methods (#3952)
• Add filters.Mention (#3941 closes #3799)
• Rename proxy_url to proxy and Allow httpx.{Proxy, URL} as Input (#3939 closes #3844)
Bug Fixes & Changes
• Adjust read_timeout Behavior for Bot.get_updates (#3963 closes #3893)
• Improve BaseHandler.__repr__ for Callbacks without __qualname__ (#3934)
• Fix Persistency Issue with Ended Non-Blocking Conversations (#3962)
• Improve Type Hinting for Arguments with Default Values in Bot (#3942)
Documentation Improvements
• Add Documentation for __aenter__ and __aexit__ Methods (#3907 closes #3886)
• Improve Insertion of Kwargs into Bot Methods (#3965)
Internal Changes
• Adjust Tests to New Error Messages (#3970)
Dependency Updates
• Bump pytest-xdist from 3.3.1 to 3.4.0 (#3975)
• pre-commit autoupdate (#3967)
• Update httpx requirement from ~=0.25.1 to ~=0.25.2 (#3983)
• Bump pytest-xdist from 3.4.0 to 3.5.0 (#3982)
• Update httpx requirement from ~=0.25.0 to ~=0.25.1 (#3961)
• Bump srvaroa/labeler from 1.6.1 to 1.7.0 (#3958)
• Update cachetools requirement from ~=5.3.1 to ~=5.3.2 (#3954)
• Bump pytest from 7.4.2 to 7.4.3 (#3953)
is there any bots that can add/remove users to/from a group in bulk
Читать полностью…
idk can u use t commands
pip install python-telegram-bot
pip install websocket-client
Hello, I want to install the python-telegram-bot websockter-client.
I've read that i can use the 'pip' package manager, it says to open a terminal or command prompt and run the following
pip install python-telegram-bot websocket-client
Whenever i do this i get this message back
pip install python-telegram-bot websocket-client
^^^^^^^
SyntaxError: invalid syntax
>>>
Game
python-telegram-bot documentation for this class:
telegram.Game
Telegram's official Bot API documentation has more info about Game.
telegram.Bot.send_game ᵀᴱᴸᴱᴳᴿᴬᴹ
webappbot.py
hey guys maybe someone has an idea how to create game Im using telegram bot and trying to come up with a way to make this game called "crypto crash" idea is when user types /play bot starts multiplier
Multiplier: 1.01x
Multiplier: 1.02x
Multiplier: 1.03x
and so on, it has to be fast and user at any moment can type /leave before initial crash happens. But the problem is that if I set bot to sent messages with updating multiplier telegram rate limit kicks in. Any way to bypass telegram rate limit? or maybe someone has an idea how to visually represent multiplier game?
Consider using me in inline-mode 😎 @roolsbot Your search terms
Consider using me in inline-mode 😎 @roolsbot Your search terms
Consider using me in inline-mode 😎 @roolsbot Your search terms
Hi. I'm a bot that will announce the rules of the python-telegram-bot groups when you type /rules.
Читать полностью…
Wiki of python-telegram-bot - Category FAQ
Can you add [feature] to PTB? Can I do [thing] with my bot?
If you absolutely need to send it, upload it somewhere
Читать полностью…
You're doing this in the Python shell in cmd
Читать полностью…
AFAIK TG doesn't have any native solution for that. I guess you can send an invoice each month and cancel the subscription in case the payment is not received wtihin a predefined time span
Читать полностью…