mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-05 17:02:32 -05:00
Port TiV changes applied to voice channels to stage channels (#6109)
This commit is contained in:
@@ -197,7 +197,13 @@ class MixinMeta(ABC):
|
||||
self,
|
||||
config: Config,
|
||||
ctx_or_channel: Optional[
|
||||
Union[Context, discord.TextChannel, discord.VoiceChannel, discord.Thread]
|
||||
Union[
|
||||
Context,
|
||||
discord.TextChannel,
|
||||
discord.VoiceChannel,
|
||||
discord.StageChannel,
|
||||
discord.Thread,
|
||||
]
|
||||
],
|
||||
query: str,
|
||||
query_obj: Query,
|
||||
@@ -253,7 +259,10 @@ class MixinMeta(ABC):
|
||||
|
||||
@abstractmethod
|
||||
def _has_notify_perms(
|
||||
self, channel: Union[discord.TextChannel, discord.VoiceChannel, discord.Thread]
|
||||
self,
|
||||
channel: Union[
|
||||
discord.TextChannel, discord.VoiceChannel, discord.StageChannel, discord.Thread
|
||||
],
|
||||
) -> bool:
|
||||
raise NotImplementedError()
|
||||
|
||||
|
||||
@@ -100,7 +100,10 @@ class MiscellaneousUtilities(MixinMeta, metaclass=CompositeMetaClass):
|
||||
return await ctx.send(embed=embed)
|
||||
|
||||
def _has_notify_perms(
|
||||
self, channel: Union[discord.TextChannel, discord.VoiceChannel, discord.Thread]
|
||||
self,
|
||||
channel: Union[
|
||||
discord.TextChannel, discord.VoiceChannel, discord.StageChannel, discord.Thread
|
||||
],
|
||||
) -> bool:
|
||||
perms = channel.permissions_for(channel.guild.me)
|
||||
return all((can_user_send_messages_in(channel.guild.me, channel), perms.embed_links))
|
||||
|
||||
@@ -61,7 +61,13 @@ class ValidationUtilities(MixinMeta, metaclass=CompositeMetaClass):
|
||||
self,
|
||||
config: Config,
|
||||
ctx_or_channel: Optional[
|
||||
Union[Context, discord.TextChannel, discord.VoiceChannel, discord.Thread]
|
||||
Union[
|
||||
Context,
|
||||
discord.TextChannel,
|
||||
discord.VoiceChannel,
|
||||
discord.StageChannel,
|
||||
discord.Thread,
|
||||
]
|
||||
],
|
||||
query: str,
|
||||
query_obj: Query,
|
||||
|
||||
Reference in New Issue
Block a user