-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
invalidThis is not right.This is not right.questionThis is a question about the libraryThis is a question about the library
Description
Summary
I perform ClientUser.edit too frequently (more than 2 times for username change per hour) and getting rate limited. However I was waiting for quite some time (more than 10 minutes) and command not finishing and I am not getting any warning/error messages until I go enable debug logs.
Reproduction Steps
Just run this more than 2 times per hour
await self.bot.user.edit(username=username, avatar=binarybytes)
Expected Results
I expect to see some logs at WARNING level at least in the logging if the rate limit for retry is more than 5 minutes and in this case, it's almost one hour, so I wouldn't need to enable debug logs to find out the rate limit for this. I will let the devs decide the threshold but it should be at least something.
Actual Results
I had to enable logging.DEBUG to find out what's the issue.
2019-08-23 14:05:43,428:discord.http.DEBUG:A rate limit bucket has been exhausted (bucket: PATCH:None:None:/users/@me, retry: 2245.0).
2019-08-23 14:05:43,429:discord.client.DEBUG:Dispatching event command_error
Ignoring exception in command idol_change:
Traceback (most recent call last):
File "/root/.local/share/virtualenvs/discordbot-aikatsup-search-rTcs97OV/lib/python3.7/site-packages/discord/ext/commands/core.py", line 79, in wrapped
ret = await coro(*args, **kwargs)
File "/backup/scripts_dir/discordbot-aikatsup-search/discordbot-aikatsup-search/cogs/test.py", line 386, in idol_change
await self.idol_change_function(ctx, idol)
File "/backup/scripts_dir/discordbot-aikatsup-search/discordbot-aikatsup-search/cogs/test.py", line 408, in idol_change_function
await self.bot.user.edit(username=idol_dict[idol],avatar=binarybytes)
File "/root/.local/share/virtualenvs/discordbot-aikatsup-search-rTcs97OV/lib/python3.7/site-packages/discord/user.py", line 457, in edit
data = await http.edit_profile(**args)
File "/root/.local/share/virtualenvs/discordbot-aikatsup-search-rTcs97OV/lib/python3.7/site-packages/discord/http.py", line 222, in request
raise HTTPException(r, data)
discord.errors.HTTPException: 400 BAD REQUEST (error code: 50035): Invalid Form Body
In username: You are changing your username or Discord Tag too fast. Try again later.
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.7.2-final
- discord.py v1.2.3-final
- aiohttp v3.5.4
- websockets v6.0
- system info: Linux 5.1.2-1.el7.elrepo.x86_64 Fix issue with author changing type #1 SMP Tue May 14 18:19:37 EDT 2019
Metadata
Metadata
Assignees
Labels
invalidThis is not right.This is not right.questionThis is a question about the libraryThis is a question about the library