Skip to content

Commit

Permalink
Bugfix/webhook major param (#1102)
Browse files Browse the repository at this point in the history
  • Loading branch information
FasterSpeeding committed Mar 25, 2022
1 parent 3557c3a commit d7c82f9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions changes/1102.bugfix.md
@@ -0,0 +1 @@
Take the major param for webhook without token endpoints when handling bucket ratelimits.
1 change: 1 addition & 0 deletions hikari/internal/routes.py
Expand Up @@ -43,6 +43,7 @@
frozenset(("channel",)): lambda d: d["channel"],
frozenset(("guild",)): lambda d: d["guild"],
frozenset(("webhook", "token")): lambda d: d["webhook"] + ":" + d["token"],
frozenset(("webhook",)): lambda d: d["webhook"],
}


Expand Down
1 change: 1 addition & 0 deletions tests/hikari/internal/test_routes.py
Expand Up @@ -54,6 +54,7 @@ class TestRoute:
(routes.DELETE_CHANNEL, frozenset(("channel",))),
(routes.PATCH_GUILD, frozenset(("guild",))),
(routes.POST_WEBHOOK_WITH_TOKEN, frozenset(("webhook", "token"))),
(routes.GET_WEBHOOK, frozenset(("webhook",))),
(routes.GET_INVITE, None),
],
)
Expand Down

0 comments on commit d7c82f9

Please sign in to comment.