mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-21 16:52:31 -05:00
Port TiV changes applied to voice channels to stage channels (#6109)
This commit is contained in:
@@ -837,7 +837,10 @@ class Red(
|
||||
return False
|
||||
|
||||
if guild:
|
||||
assert isinstance(channel, (discord.TextChannel, discord.VoiceChannel, discord.Thread))
|
||||
assert isinstance(
|
||||
channel,
|
||||
(discord.TextChannel, discord.VoiceChannel, discord.StageChannel, discord.Thread),
|
||||
)
|
||||
if not can_user_send_messages_in(guild.me, channel):
|
||||
return False
|
||||
if not (await self.ignored_channel_or_guild(message)):
|
||||
@@ -1291,6 +1294,7 @@ class Red(
|
||||
channel: Union[
|
||||
discord.TextChannel,
|
||||
discord.VoiceChannel,
|
||||
discord.StageChannel,
|
||||
commands.Context,
|
||||
discord.User,
|
||||
discord.Member,
|
||||
@@ -1305,7 +1309,7 @@ class Red(
|
||||
|
||||
Arguments
|
||||
---------
|
||||
channel : Union[`discord.TextChannel`, `discord.VoiceChannel`, `commands.Context`, `discord.User`, `discord.Member`, `discord.Thread`]
|
||||
channel : Union[`discord.TextChannel`, `discord.VoiceChannel`, `discord.StageChannel`, `commands.Context`, `discord.User`, `discord.Member`, `discord.Thread`]
|
||||
The target messageable object to check embed settings for.
|
||||
|
||||
Keyword Arguments
|
||||
@@ -1352,7 +1356,10 @@ class Red(
|
||||
"You cannot pass a GroupChannel, DMChannel, or PartialMessageable to this method."
|
||||
)
|
||||
|
||||
if isinstance(channel, (discord.TextChannel, discord.VoiceChannel, discord.Thread)):
|
||||
if isinstance(
|
||||
channel,
|
||||
(discord.TextChannel, discord.VoiceChannel, discord.StageChannel, discord.Thread),
|
||||
):
|
||||
channel_id = channel.parent_id if isinstance(channel, discord.Thread) else channel.id
|
||||
|
||||
if check_permissions and not channel.permissions_for(channel.guild.me).embed_links:
|
||||
@@ -2075,7 +2082,9 @@ class Red(
|
||||
|
||||
async def get_owner_notification_destinations(
|
||||
self,
|
||||
) -> List[Union[discord.TextChannel, discord.VoiceChannel, discord.User]]:
|
||||
) -> List[
|
||||
Union[discord.TextChannel, discord.VoiceChannel, discord.StageChannel, discord.User]
|
||||
]:
|
||||
"""
|
||||
Gets the users and channels to send to
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user