Implement Messageable for StageChannel

Fix #9248
This commit is contained in:
Rapptz
2023-02-25 03:13:55 -05:00
parent 29461ddb5f
commit da4651c97c
3 changed files with 119 additions and 103 deletions

View File

@ -83,7 +83,15 @@ if TYPE_CHECKING:
from .channel import CategoryChannel
from .embeds import Embed
from .message import Message, MessageReference, PartialMessage
from .channel import TextChannel, DMChannel, GroupChannel, PartialMessageable, VoiceChannel
from .channel import (
TextChannel,
DMChannel,
GroupChannel,
PartialMessageable,
VocalGuildChannel,
VoiceChannel,
StageChannel,
)
from .threads import Thread
from .enums import InviteTarget
from .ui.view import View
@ -97,7 +105,7 @@ if TYPE_CHECKING:
SnowflakeList,
)
PartialMessageableChannel = Union[TextChannel, VoiceChannel, Thread, DMChannel, PartialMessageable]
PartialMessageableChannel = Union[TextChannel, VoiceChannel, StageChannel, Thread, DMChannel, PartialMessageable]
MessageableChannel = Union[PartialMessageableChannel, GroupChannel]
SnowflakeTime = Union["Snowflake", datetime]
@ -118,7 +126,7 @@ async def _single_delete_strategy(messages: Iterable[Message], *, reason: Option
async def _purge_helper(
channel: Union[Thread, TextChannel, VoiceChannel],
channel: Union[Thread, TextChannel, VocalGuildChannel],
*,
limit: Optional[int] = 100,
check: Callable[[Message], bool] = MISSING,