diff --git a/melisa/models/guild/channel.py b/melisa/models/guild/channel.py index 3564c66..2fdab38 100644 --- a/melisa/models/guild/channel.py +++ b/melisa/models/guild/channel.py @@ -311,9 +311,9 @@ class MessageableChannel(Channel): self, limit: int = 50, *, - before: Optional[Union[int, Snowflake]] = None, - after: Optional[Union[int, Snowflake]] = None, - around: Optional[Union[int, Snowflake]] = None, + before: Optional[Snowflake] = None, + after: Optional[Snowflake] = None, + around: Optional[Snowflake] = None, ) -> AsyncIterator[Dict[str, Any]]: """|coro| @@ -328,13 +328,13 @@ class MessageableChannel(Channel): Parameters ---------- - limit : Optional[Union[:class:`int`, :class:`str`, :class:`~.melisa.Snowflake`]] + limit : Optional[:class:`~.melisa.Snowflake`] Max number of messages to return (1-100). - around : Optional[Union[:class:`int`, :class:`str`, :class:`~.melisa.Snowflake`]] + around : Optional[:class:`~.melisa.Snowflake`] Get messages around this message ID. - before : Optional[Union[:class:`int`, :class:`str`, :class:`~.melisa.Snowflake`]] + before : Optional[:class:`~.melisa.Snowflake`] Get messages before this message ID. - after : Optional[Union[:class:`int`, :class:`str`, :class:`~.melisa.Snowflake`]] + after : Optional[:class:`~.melisa.Snowflake`] Get messages after this message ID. Raises @@ -469,9 +469,9 @@ class MessageableChannel(Channel): self, limit: int = 50, *, - before: Optional[Union[int, str, Snowflake]] = None, - after: Optional[Union[int, str, Snowflake]] = None, - around: Optional[Union[int, str, Snowflake]] = None, + before: Optional[Snowflake] = None, + after: Optional[Snowflake] = None, + around: Optional[Snowflake] = None, reason: Optional[str] = None, ): """|coro| @@ -481,13 +481,13 @@ class MessageableChannel(Channel): Parameters ---------- - limit : Optional[Union[:class:`int`, :class:`str`, :class:`~.melisa.Snowflake`]] + limit : Optional[:class:`~.melisa.Snowflake`] Max number of messages to purge. - around : Optional[Union[:class:`int`, :class:`str`, :class:`~.melisa.Snowflake`]] + around : Optional[:class:`~.melisa.Snowflake`] Get messages around this message ID. - before : Optional[Union[:class:`int`, :class:`str`, :class:`~.melisa.Snowflake`]] + before : Optional[:class:`~.melisa.Snowflake`] Get messages before this message ID. - after : Optional[Union[:class:`int`, :class:`str`, :class:`~.melisa.Snowflake`]] + after : Optional:class:`~.melisa.Snowflake`] Get messages after this message ID. reason: Optional[:class:`str`] The reason of the channel purge operation. @@ -498,7 +498,7 @@ class MessageableChannel(Channel): The request to perform the action failed with other http exception. ForbiddenError You do not have proper permissions to do the actions required. - (You must have **MANAGE_MESSAGES** permission) + (You must have ``MANAGE_MESSAGES`` permission) """ iterator = self.history( @@ -631,7 +631,7 @@ class Thread(MessageableChannel): async def add_user( self, - user_id: Union[int, Snowflake] + user_id: Snowflake ) -> None: """|coro| @@ -643,7 +643,7 @@ class Thread(MessageableChannel): Parameters ---------- - user_id: Union[int, :class:`~melisa.utils.Snowflake`] + user_id: :class:`~melisa.utils.Snowflake` Id of user to add to the thread. Raises @@ -658,7 +658,7 @@ class Thread(MessageableChannel): async def remove_user( self, - user_id: Union[int, Snowflake] + user_id: Snowflake ) -> None: """|coro| @@ -668,7 +668,7 @@ class Thread(MessageableChannel): Parameters ---------- - user_id: Union[int, :class:`~melisa.utils.Snowflake`] + user_id: :class:`~melisa.utils.Snowflake` Id of user to add to the thread. Raises diff --git a/melisa/models/message/message.py b/melisa/models/message/message.py index cdbc8b6..4e61f15 100644 --- a/melisa/models/message/message.py +++ b/melisa/models/message/message.py @@ -96,7 +96,7 @@ class MessageFlags(IntEnum): return self.value -@dataclass(repl=False) +@dataclass(repr=False) class Message(APIModelBase): """Represents a message sent in a channel within Discord. @@ -146,7 +146,7 @@ class Message(APIModelBase): Sent with Rich Presence-related chat embeds application: :class:`typing.Any` Sent with Rich Presence-related chat embeds - application_id: :class:`~melisa.utils.types.Snowflake` + application_id: :class:`~melisa.Snowflake` If the message is an Interaction or application-owned webhook, this is the id of the application message_reference: :class:`typing.Any` Data showing the source of a crosspost, channel follow add, pin, or reply message