Skip to content

Commit e09b9ee

Browse files
committed
:fix: Copilot suggest
1 parent 46aa671 commit e09b9ee

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

discord/interactions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ def to_dict(self) -> dict[str, Any]:
667667

668668

669669
class ModalInteraction(Interaction, Generic[Unpack[Components_t]]):
670-
__slots__ = ("_components", "users", "attachments")
670+
__slots__ = ("_components", "users", "attachments", "roles")
671671

672672
def __init__(self, *, data: ModalInteractionPayload, state: ConnectionState):
673673
super().__init__(data=data, state=state)

discord/types/component_types.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@
3939
SeparatorSpacingSize = Literal[1, 2]
4040

4141

42-
class BaseComponent(TypedDict):
43-
type: ComponentType
44-
id: NotRequired[int]
45-
46-
4742
class BaseComponent(TypedDict):
4843
type: ComponentType
4944
id: NotRequired[int]
@@ -207,7 +202,7 @@ class ActionRow(BaseComponent):
207202
components: list[AllowedActionRowComponents]
208203

209204

210-
AllowedContainerComponents = (
205+
AllowedContainerComponents: TypeAlias = (
211206
ActionRow | TextDisplayComponent | MediaGalleryComponent | FileComponent | SeparatorComponent | SectionComponent
212207
)
213208

@@ -266,10 +261,6 @@ class Modal(TypedDict):
266261
components: list[AllowedModalComponents]
267262

268263

269-
AllowedContainerComponents = (
270-
ActionRow | TextDisplayComponent | MediaGalleryComponent | FileComponent | SeparatorComponent | SectionComponent
271-
)
272-
273264
__all__ = (
274265
"ComponentType",
275266
"ButtonStyle",

discord/webhook/async_.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1931,8 +1931,8 @@ async def edit_message(
19311931
allowed_mentions: :class:`AllowedMentions`
19321932
Controls the mentions being processed in this message.
19331933
See :meth:`.abc.Messageable.send` for more information.
1934-
components: Optional[Sequence[AnyComponent]]
1935-
# TODO: docstring
1934+
components:
1935+
The components to edit the message with.
19361936
.. versionadded:: 3.0
19371937
thread: Optional[:class:`~discord.abc.Snowflake`]
19381938
The thread that contains the message.

0 commit comments

Comments
 (0)