This group is for questions, answers and discussions around the python-telegram-bot library. Off-topic group: @pythontelegrambottalk | Website: https://python-telegram-bot.org
I am making a large bot with many commands and categories , i am importing all modules and getting all handlers to use them in commandhandler with this code , it is working perfectly but i am worried , is there any more stable way of doing this ? https://pastebin.com/22RcSQKQ
Читать полностью…I appreciate your help, I did everything you said but nothing happens, I will restart my PC hopefully that will help
Читать полностью…Traceback (most recent call last):
File "F:\mahdi\code\main.py", line 2, in <module>
from telegram.ext import Updater, MessageHandler, filters, CommandHandler
ModuleNotFoundError: No module named 'telegram'
Hi, can anyone help me? please
I tried to reinstall the package and other solution but non of them worked, any suggustions ?
please read the info boxes in the documentation of the +ext.Job+ class !search
Читать полностью…There is the 30-response per second limit for bots. I assume this limit also includes editing messages?
Читать полностью…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
uninstall all telegram libraries from terminal with pip or pip3 or pipx if u have them installed there
Читать полностью…if you use pycharm go and install the package manually
Читать полностью…its working pretty well actually , i just dont know i think my code could be better or i could do it in another way
Читать полностью…The problem is when I hit run it's will run fine with no any problems but when I type in terminal
python main.py
To run the script it shows up with this error
for example i have 1 directory named 'modules' , inside that directory i have many categories such as 'moderation' and in each category i have commands
Читать полностью…duoble check that you installed ptb to the correct (virtual) python environment/python version. Also double check the console output that's printed when you install ptb to check if any error messages are mentioned
Читать полностью…not a game but more like a webpage. like the message @wallet sent furing their promotion.
Читать полностью…Game
python-telegram-bot documentation for this class:
telegram.Game
Telegram's official Bot API documentation has more info about Game.
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?