A
A
AruxGame2020-08-13 13:35:03
Python
AruxGame, 2020-08-13 13:35:03

Why is TelegramBot crashing?

Here is the code:

2020-08-13 13:31:39,481 (util.py:68 WorkerThread2) ERROR - TeleBot: "ApiException occurred, args=('A request to the Telegram API was unsuccessful. The server returned HTTP 429 Too Many Requests. Response body:\n[b\'{"ok":false,"error_code":429,"description":"Too Many Requests: retry after 17","parameters":{"retry_after":17}}\']',)
Traceback (most recent call last):
  File "C:\Python34\lib\site-packages\telebot\util.py", line 62, in run
    task(*args, **kwargs)
  File "C:\Users\User\Desktop\TeleBotArux\ddos_user.py", line 38, in start
    bot.send_message(-1234567890, "Это DDOS - Атака")
  File "C:\Python34\lib\site-packages\telebot\__init__.py", line 641, in send_message
    reply_markup, parse_mode, disable_notification, timeout))
  File "C:\Python34\lib\site-packages\telebot\apihelper.py", line 166, in send_message
    return _make_request(token, method_url, params=payload, method='post')
  File "C:\Python34\lib\site-packages\telebot\apihelper.py", line 69, in _make_request
    return _check_result(method_name, result)['result']
  File "C:\Python34\lib\site-packages\telebot\apihelper.py", line 88, in _check_result
    raise ApiException(msg, method_name, result)
telebot.apihelper.ApiException: A request to the Telegram API was unsuccessful. The server returned HTTP 429 Too Many Requests. Response body:
[b'{"ok":false,"error_code":429,"description":"Too Many Requests: retry after 17","parameters":{"retry_after":17}}']
"
2020-08-13 13:31:39,485 (__init__.py:455 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. The server returned HTTP 429 Too Many Requests. Response body:
[b'{"ok":false,"error_code":429,"description":"Too Many Requests: retry after 17","parameters":{"retry_after":17}}']"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SKEPTIC, 2020-08-13
@AruxGame

Too many requests. It's good to spam.
BOT LIMITS The
maximum number of bots per account created via @BotFather is 20.
Bot @username length is from 5 to 32 characters.
The maximum length of information about the bot (/setabouttext) is 120 characters.
The maximum length of the bot description (description) is 512 characters.
Max. the number of messages from the bot per second is 30.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question