mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-16 18:59:09 +00:00
Fix PartialMessage rejecting Threads
This commit is contained in:
parent
906c13d4f0
commit
0112c2819f
@ -1632,8 +1632,15 @@ class PartialMessage(Hashable):
|
|||||||
to_message_reference_dict = Message.to_message_reference_dict
|
to_message_reference_dict = Message.to_message_reference_dict
|
||||||
|
|
||||||
def __init__(self, *, channel: PartialMessageableChannel, id: int):
|
def __init__(self, *, channel: PartialMessageableChannel, id: int):
|
||||||
if channel.type not in (ChannelType.text, ChannelType.news, ChannelType.private):
|
if channel.type not in (
|
||||||
raise TypeError(f'Expected TextChannel or DMChannel not {type(channel)!r}')
|
ChannelType.text,
|
||||||
|
ChannelType.news,
|
||||||
|
ChannelType.private,
|
||||||
|
ChannelType.news_thread,
|
||||||
|
ChannelType.public_thread,
|
||||||
|
ChannelType.private_thread
|
||||||
|
):
|
||||||
|
raise TypeError(f'Expected TextChannel, DMChannel or Thread not {type(channel)!r}')
|
||||||
|
|
||||||
self.channel: PartialMessageableChannel = channel
|
self.channel: PartialMessageableChannel = channel
|
||||||
self._state: ConnectionState = channel._state
|
self._state: ConnectionState = channel._state
|
||||||
|
Loading…
x
Reference in New Issue
Block a user