diff --git a/CHANGELOG.md b/CHANGELOG.md index 32dacf395b..ff875bfce3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,8 @@ These changes are available on the `master` branch, but have not yet been releas ([#3231](https://github.com/Pycord-Development/pycord/pull/3231)) - Allow `ForumTag` to be created without an emoji. ([#3245](https://github.com/Pycord-Development/pycord/pull/3245)) +- Fix an attribute error when using `Webhook.edit_message()` with views. + ([#3239](https://github.com/Pycord-Development/pycord/pull/3239)) - Fix `PollAnswer.to_dict()` incorrectly setting `answer_id` attribute as a tuple instead of an integer. ([#3260](https://github.com/Pycord-Development/pycord/pull/3260)) diff --git a/discord/webhook/async_.py b/discord/webhook/async_.py index 5dcd8e4bd6..53689278aa 100644 --- a/discord/webhook/async_.py +++ b/discord/webhook/async_.py @@ -2115,8 +2115,8 @@ async def edit_message( raise InvalidArgument( "Dispatchable Webhook views require an associated state with the webhook" ) - - self._state.prevent_view_updates_for(message_id) + if not isinstance(self._state, _WebhookState): + self._state.prevent_view_updates_for(message_id) if self.type is not WebhookType.application: with_components = True