-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
no reproCannot be reproduced.Cannot be reproduced.
Description
Summary
Context:
I got a bot that broadcast messages (Game updates) to multiple thousand servers (who subscribed to it). I try to do this task as fast as possible. Normally I post it with multiple threads and discord.py auto handles the rate limits for me.
It seems that since 01/26 it sometimes happens that the retry_after parameter isn't included?
This only happens after approx. 4min of posting at max speed.
Reproduction Steps
I'm not sure. I think sending messages at max speed.
Expected Results
The API auto handles the missing retry_after parameter and might do a default timeout.
Actual Results
An error gets thrown:
message = await channel.fetch_message(int(message_data['message_id']))
File "/opt/EasyFortniteStats/bot_venv/lib/python3.8/site-packages/discord/abc.py", line 921, in fetch_message
data = await self._state.http.get_message(channel.id, id)
File "/opt/EasyFortniteStats/bot_venv/lib/python3.8/site-packages/discord/http.py", line 189, in request
retry_after = data['retry_after'] / 1000.0
KeyError: 'retry_after'
NoneType: None
Checklist
- I have searched the open issues for duplicates.
- I have shown the entire traceback, if possible.
- I have removed my token from display, if visible.
System Information
- Python v3.8.0-final
- discord.py v1.3.1-final
- aiohttp v3.5.4
- websockets v6.0
- system info: Linux 4.9.0-11-amd64 Fix issue with author changing type #1 SMP Debian 4.9.189-3+deb9u2 (2019-11-11)
Metadata
Metadata
Assignees
Labels
no reproCannot be reproduced.Cannot be reproduced.