Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions interactions/models/discord/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ class MessageableMixin(SendMixin):
repr=False, default=None, converter=optional_c(timestamp_converter)
)
"""When the last pinned message was pinned. This may be None when a message is not pinned."""
rate_limit_per_user: int = attrs.field(repr=False, default=0)
"""Amount of seconds a user has to wait before sending another message (0-21600)"""

async def _send_http_request(
self, message_payload: Union[dict, "FormData"], files: list["UPLOADABLE_TYPE"] | None = None
Expand Down Expand Up @@ -1691,8 +1693,6 @@ async def create_thread_from_message(
class GuildText(GuildChannel, MessageableMixin, InvitableMixin, ThreadableMixin, WebhookMixin):
topic: Optional[str] = attrs.field(repr=False, default=None)
"""The channel topic (0-1024 characters)"""
rate_limit_per_user: int = attrs.field(repr=False, default=0)
"""Amount of seconds a user has to wait before sending another message (0-21600)"""

async def edit(
self,
Expand Down Expand Up @@ -2394,6 +2394,8 @@ class GuildForum(GuildChannel):
"""The default emoji to react with for posts"""
last_message_id: Optional[Snowflake_Type] = attrs.field(repr=False, default=None)
# TODO: Implement "template" once the API supports them
rate_limit_per_user: int = attrs.field(repr=False, default=0)
"""Amount of seconds a user has to wait before sending another message (0-21600)"""

@classmethod
def _process_dict(cls, data: Dict[str, Any], client: "Client") -> Dict[str, Any]:
Expand Down