Port TiV changes applied to voice channels to stage channels (#6109)

This commit is contained in:
Jakub Kuczys
2023-05-03 01:05:44 +02:00
committed by GitHub
parent f1439a37c8
commit 2fe251ecf3
28 changed files with 213 additions and 95 deletions

View File

@@ -315,7 +315,11 @@ if TYPE_CHECKING or os.getenv("BUILDING_DOCS", False):
...
@property
def channel(self) -> Union[discord.TextChannel, discord.VoiceChannel, discord.Thread]:
def channel(
self,
) -> Union[
discord.TextChannel, discord.VoiceChannel, discord.StageChannel, discord.Thread
]:
...
@property

View File

@@ -889,7 +889,12 @@ class RedHelpFormatter(HelpFormatterABC):
# We need to wrap this in a task to not block after-sending-help interactions.
# The channel has to be TextChannel or Thread as we can't bulk-delete from DMs
async def _delete_delay_help(
channel: Union[discord.TextChannel, discord.VoiceChannel, discord.Thread],
channel: Union[
discord.TextChannel,
discord.VoiceChannel,
discord.StageChannel,
discord.Thread,
],
messages: List[discord.Message],
delay: int,
):

View File

@@ -73,6 +73,7 @@ _T = TypeVar("_T")
GlobalPermissionModel = Union[
discord.User,
discord.VoiceChannel,
discord.StageChannel,
discord.TextChannel,
discord.ForumChannel,
discord.CategoryChannel,
@@ -82,6 +83,7 @@ GlobalPermissionModel = Union[
GuildPermissionModel = Union[
discord.Member,
discord.VoiceChannel,
discord.StageChannel,
discord.TextChannel,
discord.ForumChannel,
discord.CategoryChannel,