From 49b9242f925d4d00fd37985690f5143cbb4e66ed Mon Sep 17 00:00:00 2001 From: TyrantLink Date: Fri, 25 Oct 2024 05:52:14 -0700 Subject: [PATCH 1/4] fix: add store poll to webhook state --- discord/webhook/async_.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/discord/webhook/async_.py b/discord/webhook/async_.py index 090f7c96f2..23b6386a7d 100644 --- a/discord/webhook/async_.py +++ b/discord/webhook/async_.py @@ -803,6 +803,12 @@ def create_user(self, data): # state parameter is artificial return BaseUser(state=self, data=data) # type: ignore + def store_poll(self, poll: Poll, message_id: int): + if self._parent is not None: + return self._parent.store_poll(poll, message_id) + # state parameter is artificial + return None + @property def http(self): if self._parent is not None: From 8e0dc29d058039f6d3b71944f6d3c3ff69d73e72 Mon Sep 17 00:00:00 2001 From: TyrantLink Date: Fri, 25 Oct 2024 05:58:01 -0700 Subject: [PATCH 2/4] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index daf082ae66..ff5a9c9fa9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,8 @@ These changes are available on the `master` branch, but have not yet been releas ([#2587](https://github.com/Pycord-Development/pycord/pull/2587/)) - Added optional `filter` parameter to `utils.basic_autocomplete()`. ([#2590](https://github.com/Pycord-Development/pycord/pull/2590)) +- Added `store_poll` method to `Webhook._WebhookState`. + ([#2624](https://github.com/Pycord-Development/pycord/pull/2624)) ### Fixed From 8d0a6d0e40e51f3dd595bde44f9ec33940db9f17 Mon Sep 17 00:00:00 2001 From: TyrantLink Date: Fri, 25 Oct 2024 13:26:52 -0700 Subject: [PATCH 3/4] Update CHANGELOG.md --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff5a9c9fa9..18e58c0d59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,8 +30,6 @@ These changes are available on the `master` branch, but have not yet been releas ([#2587](https://github.com/Pycord-Development/pycord/pull/2587/)) - Added optional `filter` parameter to `utils.basic_autocomplete()`. ([#2590](https://github.com/Pycord-Development/pycord/pull/2590)) -- Added `store_poll` method to `Webhook._WebhookState`. - ([#2624](https://github.com/Pycord-Development/pycord/pull/2624)) ### Fixed @@ -50,6 +48,8 @@ These changes are available on the `master` branch, but have not yet been releas ([#2595](https://github.com/Pycord-Development/pycord/pull/2595)) - Fixed `BucketType.category` cooldown commands not functioning correctly in private channels. ([#2603](https://github.com/Pycord-Development/pycord/pull/2603)) +- Fixed `Webhook._WebhookState` missing `store_poll` method. + ([#2624](https://github.com/Pycord-Development/pycord/pull/2624)) ### Changed From 6ff21268a67329d0471165ed3d1079c40277ebb8 Mon Sep 17 00:00:00 2001 From: TyrantLink Date: Thu, 31 Oct 2024 22:51:54 -0700 Subject: [PATCH 4/4] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 166b5940a9..cd0f3b8128 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,7 +52,7 @@ These changes are available on the `master` branch, but have not yet been releas ([#2611](https://github.com/Pycord-Development/pycord/pull/2611)) - Fixed `TypeError` when passing `skus` parameter in `Client.entitlements()`. ([#2627](https://github.com/Pycord-Development/pycord/issues/2627)) -- Fixed `Webhook._WebhookState` missing `store_poll` method. +- Fixed `AttributeError` when sending polls with `PartialWebook`. ([#2624](https://github.com/Pycord-Development/pycord/pull/2624)) ### Changed