diff --git a/CHANGELOG.md b/CHANGELOG.md index c63b835f8c..e0247cb3f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,8 @@ These changes are available on the `master` branch, but have not yet been releas - Include `bypass_slowmode` in `Permissions.all`. ([#3231](https://github.com/Pycord-Development/pycord/pull/3231)) +- Fixed `AttributeError` when using `Webhook.edit_message` with views. + ([#3239](https://github.com/Pycord-Development/pycord/pull/3239)) ### Deprecated 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