diff --git a/CHANGELOG.md b/CHANGELOG.md index 9515f21e80..4f1cb78e66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,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)) +- Fixed `AttributeError` when using `Webhook.edit_message` with views. + ([#3239](https://github.com/Pycord-Development/pycord/pull/3239)) - Fix a bug where `TextChannel.archived_threads` would ignore any limit parameter smaller than 50 and use 50 instead. ([#3266](https://github.com/Pycord-Development/pycord/pull/3266)) 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