Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from Pycord-Development:master #55

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ These changes are available on the `master` branch, but have not yet been releas
([#2500](https://github.com/Pycord-Development/pycord/pull/2500))
- Fixed the type of `ForumChannel.default_sort_order`, changing it from `int` to
`SortOrder`. ([#2500](https://github.com/Pycord-Development/pycord/pull/2500))
- Fixed `PartialMessage`s causing errors when created from `PartialMessageable`.
([#2568](https://github.com/Pycord-Development/pycord/pull/2500))

## [2.6.0] - 2024-07-09

Expand Down
8 changes: 5 additions & 3 deletions discord/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
from urllib.parse import parse_qs, urlparse

from . import utils
from .channel import PartialMessageable
from .components import _component_factory
from .embeds import Embed
from .emoji import Emoji
Expand Down Expand Up @@ -2001,6 +2002,7 @@ class PartialMessage(Hashable):
- :meth:`DMChannel.get_partial_message`
- :meth:`VoiceChannel.get_partial_message`
- :meth:`StageChannel.get_partial_message`
- :meth:`PartialMessageable.get_partial_message`

Note that this class is trimmed down and has no rich attributes.

Expand All @@ -2022,7 +2024,7 @@ class PartialMessage(Hashable):

Attributes
----------
channel: Union[:class:`TextChannel`, :class:`Thread`, :class:`DMChannel`, :class:`VoiceChannel`, :class:`StageChannel`]
channel: Union[:class:`TextChannel`, :class:`Thread`, :class:`DMChannel`, :class:`VoiceChannel`, :class:`StageChannel`, :class:`PartialMessageable`]
The channel associated with this partial message.
id: :class:`int`
The message ID.
Expand Down Expand Up @@ -2053,9 +2055,9 @@ def __init__(self, *, channel: PartialMessageableChannel, id: int):
ChannelType.news_thread,
ChannelType.public_thread,
ChannelType.private_thread,
):
) and not isinstance(channel, PartialMessageable):
raise TypeError(
"Expected TextChannel, VoiceChannel, StageChannel, DMChannel or Thread not"
"Expected TextChannel, VoiceChannel, StageChannel, DMChannel, Thread or PartialMessageable not"
f" {type(channel)!r}"
)

Expand Down
Loading