From 1463d8e6c7155f512d98d45da525c85b604acf4f Mon Sep 17 00:00:00 2001 From: Damego Date: Sat, 30 Jul 2022 22:40:38 +0500 Subject: [PATCH 1/4] fix: fix error with converting components in edit --- interactions/client/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interactions/client/context.py b/interactions/client/context.py index 66e79db75..5244cb917 100644 --- a/interactions/client/context.py +++ b/interactions/client/context.py @@ -255,7 +255,7 @@ async def edit( if self.message.components is not None or components is not MISSING: if components is MISSING: - _components = self.message.components + _components = _build_components(components=self.message.components) elif not components: _components = [] else: From 597ffb655a4988db26ce78de96329ab6da7d591a Mon Sep 17 00:00:00 2001 From: Damego Date: Sun, 31 Jul 2022 16:48:26 +0500 Subject: [PATCH 2/4] add build components to message.edit --- interactions/api/models/message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interactions/api/models/message.py b/interactions/api/models/message.py index 028188d44..b884ba049 100644 --- a/interactions/api/models/message.py +++ b/interactions/api/models/message.py @@ -910,7 +910,7 @@ async def edit( if not components: _components = [] elif components is MISSING: - _components = self.components + _components = _build_components(components=self.components) else: _components = _build_components(components=components) From a9eda7b954c34138e01416bf80e384dae8a99d65 Mon Sep 17 00:00:00 2001 From: Damego Date: Sun, 31 Jul 2022 16:49:07 +0500 Subject: [PATCH 3/4] doc --- interactions/api/models/message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interactions/api/models/message.py b/interactions/api/models/message.py index b884ba049..9e58e3051 100644 --- a/interactions/api/models/message.py +++ b/interactions/api/models/message.py @@ -861,7 +861,7 @@ async def edit( :param attachments?: The attachments to attach to the message. Needs to be uploaded to the CDN first :type attachments?: Optional[List[Attachment]] :param components?: A component, or list of components for the message. If `[]` the components will be removed - :type components?: Optional[Union[ActionRow, Button, SelectMenu, List[ActionRow], List[Button], List[SelectMenu]]] + :type components?: Optional[List[ActionRow]] :return: The edited message as an object. :rtype: Message """ From 50a8eea7a59ec627617aeeb1c252911d8bc36373 Mon Sep 17 00:00:00 2001 From: Damego Date: Sun, 31 Jul 2022 16:49:29 +0500 Subject: [PATCH 4/4] Revert "doc" This reverts commit a9eda7b954c34138e01416bf80e384dae8a99d65. --- interactions/api/models/message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interactions/api/models/message.py b/interactions/api/models/message.py index 9e58e3051..b884ba049 100644 --- a/interactions/api/models/message.py +++ b/interactions/api/models/message.py @@ -861,7 +861,7 @@ async def edit( :param attachments?: The attachments to attach to the message. Needs to be uploaded to the CDN first :type attachments?: Optional[List[Attachment]] :param components?: A component, or list of components for the message. If `[]` the components will be removed - :type components?: Optional[List[ActionRow]] + :type components?: Optional[Union[ActionRow, Button, SelectMenu, List[ActionRow], List[Button], List[SelectMenu]]] :return: The edited message as an object. :rtype: Message """