Add support for PartialMessageable instances

This allows library users to send messages to channels without fetching
it first.
This commit is contained in:
Rapptz committed 2021-08-10 09:24:49 -04:00
1 parent 4fca699810
commit 1279510194
6 files changed
+125 -30

No files matched your search

+2 -2
View File
@@ -78,7 +78,7 @@ if TYPE_CHECKING:
from .channel import CategoryChannel
from .embeds import Embed
from .message import Message, MessageReference, PartialMessage
from .channel import TextChannel, DMChannel, GroupChannel
from .channel import TextChannel, DMChannel, GroupChannel, PartialMessageable
from .threads import Thread
from .enums import InviteTarget
from .ui.view import View
@@ -88,7 +88,7 @@ if TYPE_CHECKING:
OverwriteType,
)
PartialMessageableChannel = Union[TextChannel, Thread, DMChannel]
PartialMessageableChannel = Union[TextChannel, Thread, DMChannel, PartialMessageable]
MessageableChannel = Union[PartialMessageableChannel, GroupChannel]
SnowflakeTime = Union["Snowflake", datetime]