Skip to content

Commit

Permalink
Run black discord\ui\select.py discord\components.py discord\enums.py…
Browse files Browse the repository at this point in the history
… discord\types\components.py
  • Loading branch information
Soheab committed Sep 25, 2023
1 parent 86a1124 commit 2bdb5fc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions discord/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,28 +571,28 @@ def to_dict(self) -> SelectDefaultValuesPayload:
'id': self.id,
'type': self._type.value,
}

@classmethod
def from_channel(cls, channel: Snowflake, /) -> Self:
return cls(
id=channel.id,
type=SelectDefaultValueType.channel,
)

@classmethod
def from_role(cls, role: Snowflake, /) -> Self:
return cls(
id=role.id,
type=SelectDefaultValueType.role,
)

@classmethod
def from_user(cls, user: Snowflake, /) -> Self:
return cls(
id=user.id,
type=SelectDefaultValueType.user,
)


@overload
def _component_factory(data: ActionRowChildComponentPayload) -> Optional[ActionRowChildComponentType]:
Expand Down

0 comments on commit 2bdb5fc

Please sign in to comment.