From 2c61cff1cd724f53477627cab6704b2716adaaf6 Mon Sep 17 00:00:00 2001 From: qoft <63415260+qoft@users.noreply.github.com> Date: Wed, 22 Mar 2023 09:33:06 -0400 Subject: [PATCH 1/5] Fixed webhook message editing on forums. --- discord/webhook/async_.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/discord/webhook/async_.py b/discord/webhook/async_.py index 08b77a1b8c..605c0158b4 100644 --- a/discord/webhook/async_.py +++ b/discord/webhook/async_.py @@ -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 From d9353137646e52733ce56b3fbfcc0fd355618315 Mon Sep 17 00:00:00 2001 From: qoft <63415260+qoft@users.noreply.github.com> Date: Sun, 26 Mar 2023 12:48:27 -0400 Subject: [PATCH 2/5] Update async_.py --- discord/webhook/async_.py | 1 + 1 file changed, 1 insertion(+) diff --git a/discord/webhook/async_.py b/discord/webhook/async_.py index 605c0158b4..b63646d51c 100644 --- a/discord/webhook/async_.py +++ b/discord/webhook/async_.py @@ -52,6 +52,7 @@ from ..mixins import Hashable from ..object import Object from ..threads import Thread +from ..channel import ForumChannel from ..user import BaseUser, User __all__ = ( From 952966fcf8c6e3cfb10c10d5c579abffe99cc407 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 26 Mar 2023 16:48:53 +0000 Subject: [PATCH 3/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- discord/webhook/async_.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/discord/webhook/async_.py b/discord/webhook/async_.py index b63646d51c..fbe7c2f958 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, @@ -52,7 +52,6 @@ from ..mixins import Hashable from ..object import Object from ..threads import Thread -from ..channel import ForumChannel from ..user import BaseUser, User __all__ = ( From 3a4e789314dea611df93eb3dfc8289fc4c19cb38 Mon Sep 17 00:00:00 2001 From: qoft <63415260+qoft@users.noreply.github.com> Date: Tue, 18 Apr 2023 10:26:14 -0400 Subject: [PATCH 4/5] Added changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4434ec0d0..54542eabc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,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 `None` being handled incorrectly for avatar in `ClientUser.edit`. ([#1994](https://github.com/Pycord-Development/pycord/pull/1994)) - Fixed scheduled events breaking when changing the location from external to a channel. @@ -55,6 +57,7 @@ These changes are available on the `master` branch, but have not yet been releas - Fixed `TypeError` being raised when passing `name` argument to bridge groups. ([#2000](https://github.com/Pycord-Development/pycord/pull/2000)) + ## [2.4.1] - 2023-03-20 ### Changed From 1bde4f9c086eef76289cb3e61425d70a25d94947 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 18 Apr 2023 19:06:01 +0000 Subject: [PATCH 5/5] style(pre-commit): auto fixes from pre-commit.com hooks --- CHANGELOG.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 529ff9360c..0e65373326 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,8 +50,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)) +- 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)) @@ -64,7 +64,6 @@ These changes are available on the `master` branch, but have not yet been releas - Fixed `TypeError` being raised when passing `name` argument to bridge groups. ([#2000](https://github.com/Pycord-Development/pycord/pull/2000)) - ## [2.4.1] - 2023-03-20 ### Changed