Skip to content

Commit 7efa3d0

Browse files
authored
Bug Fix #198
Bug Fix #198
2 parents 90c90fd + a236fca commit 7efa3d0

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

docs/source/changelog.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,24 @@ Glossary
2929
Releases
3030
----------------------
3131

32+
v2.1.3
33+
===========
34+
Bug fixes:
35+
36+
- ``[Bug]: KeyError: 'code' on rate limit #198``
37+
38+
v2.1.2
39+
===========
40+
Bug fixes:
41+
42+
- #195 VoiceMESSAGE did not delete deleted channels
43+
- Exception on initialization of static server list in case any of the messages had failed their initialization.
44+
45+
v2.1.1
46+
===========
47+
- Fixed ``[Bug]: Predefined servers' errors are not suppressed #189.``
48+
- Support for readthedocs.
49+
3250
v2.1
3351
===========
3452
- Changed the import ``import framework`` to ``import daf``. Using ``import framework`` is now deprecated.

src/_discord/http.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,8 @@ async def request(
349349

350350
# we are being rate limited
351351
if response.status == 429:
352-
if not response.headers.get("Via") or isinstance(data, str) or data["code"] == 20016:
352+
if not response.headers.get("Via") or isinstance(data, str) or ("code" in data and data["code"] == 20016):
353353
# Banned by Cloudflare more than likely.
354-
355354
raise HTTPException(response, data)
356355

357356
fmt = 'We are being rate limited. Retrying in %.2f seconds. Handled under the bucket "%s"'

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2.1.2
1+
v2.1.3

0 commit comments

Comments
 (0)