diff --git a/CHANGELOG.md b/CHANGELOG.md index d9f9721956..3dddf24f0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,8 @@ These changes are available on the `master` branch, but have not yet been releas - Fixed `AttributeError` caused by [#1957](https://github.com/Pycord-Development/pycord/pull/1957) when using listeners in cogs. ([#1989](https://github.com/Pycord-Development/pycord/pull/1989)) +- Editing a webhook message if the thread is a forum post or if the thread is a private + thread ([#1981](https://github.com/Pycord-Development/pycord/pull/1981)) - Fixed `View.message` not being set when view is sent using webhooks, including `Interaction.followup.send` or when a message is edited. ([#1997](https://github.com/Pycord-Development/pycord/pull/1997)) diff --git a/discord/webhook/async_.py b/discord/webhook/async_.py index b12c2b0007..8c73681ac1 100644 --- a/discord/webhook/async_.py +++ b/discord/webhook/async_.py @@ -38,7 +38,7 @@ from .. import utils from ..asset import Asset -from ..channel import PartialMessageable +from ..channel import ForumChannel, PartialMessageable from ..enums import WebhookType, try_enum from ..errors import ( DiscordServerError, @@ -892,6 +892,8 @@ async def edit( thread = Object(self._thread_id) elif isinstance(self.channel, Thread): thread = Object(self.channel.id) + elif isinstance(self.channel, ForumChannel): + thread = Object(self.id) if attachments is MISSING: attachments = self.attachments or MISSING