Skip to content

Commit 2cec2f4

Browse files
Add similar fix for Webhook.edit_message as well
Co-authored-by: NeloBlivion <41271523+neloblivion@users.noreply.github.com>
1 parent d1b7b85 commit 2cec2f4

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ released.
1919

2020
- Include `bypass_slowmode` in `Permissions.all`.
2121
([#3231](https://github.com/Pycord-Development/pycord/pull/3231))
22-
- Fix `PartialMessage.edit` to work with `discord.ui.DesignerView`.
22+
- Fix `PartialMessage.edit` and `Webhook.edit_message` to work with
23+
`discord.ui.DesignerView`.
2324
([#3237](https://github.com/Pycord-Development/pycord/pull/3237))
2425

2526
### Deprecated

discord/webhook/async_.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2115,8 +2115,8 @@ async def edit_message(
21152115
raise InvalidArgument(
21162116
"Dispatchable Webhook views require an associated state with the webhook"
21172117
)
2118-
2119-
self._state.prevent_view_updates_for(message_id)
2118+
if self._state._parent:
2119+
self._state.prevent_view_updates_for(message_id)
21202120
if self.type is not WebhookType.application:
21212121
with_components = True
21222122

0 commit comments

Comments
 (0)