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:
@@ -649,7 +649,7 @@ class Case:
|
||||
@classmethod
|
||||
async def from_json(
|
||||
cls,
|
||||
mod_channel: Union[discord.TextChannel, discord.VoiceChannel],
|
||||
mod_channel: Union[discord.TextChannel, discord.VoiceChannel, discord.StageChannel],
|
||||
bot: Red,
|
||||
case_number: int,
|
||||
data: dict,
|
||||
@@ -659,7 +659,7 @@ class Case:
|
||||
|
||||
Parameters
|
||||
----------
|
||||
mod_channel: `discord.TextChannel` or `discord.VoiceChannel`
|
||||
mod_channel: `discord.TextChannel` or `discord.VoiceChannel`, `discord.StageChannel`
|
||||
The mod log channel for the guild
|
||||
bot: Red
|
||||
The bot's instance. Needed to get the target user
|
||||
@@ -1252,7 +1252,7 @@ async def register_casetypes(new_types: List[dict]) -> List[CaseType]:
|
||||
|
||||
async def get_modlog_channel(
|
||||
guild: discord.Guild,
|
||||
) -> Union[discord.TextChannel, discord.VoiceChannel]:
|
||||
) -> Union[discord.TextChannel, discord.VoiceChannel, discord.StageChannel]:
|
||||
"""
|
||||
Get the current modlog channel.
|
||||
|
||||
@@ -1263,7 +1263,7 @@ async def get_modlog_channel(
|
||||
|
||||
Returns
|
||||
-------
|
||||
`discord.TextChannel` or `discord.VoiceChannel`
|
||||
`discord.TextChannel`, `discord.VoiceChannel`, or `discord.StageChannel`
|
||||
The channel object representing the modlog channel.
|
||||
|
||||
Raises
|
||||
@@ -1283,7 +1283,8 @@ async def get_modlog_channel(
|
||||
|
||||
|
||||
async def set_modlog_channel(
|
||||
guild: discord.Guild, channel: Union[discord.TextChannel, discord.VoiceChannel, None]
|
||||
guild: discord.Guild,
|
||||
channel: Union[discord.TextChannel, discord.VoiceChannel, discord.StageChannel, None],
|
||||
) -> bool:
|
||||
"""
|
||||
Changes the modlog channel
|
||||
@@ -1292,7 +1293,7 @@ async def set_modlog_channel(
|
||||
----------
|
||||
guild: `discord.Guild`
|
||||
The guild to set a mod log channel for
|
||||
channel: `discord.TextChannel`, `discord.VoiceChannel`, or `None`
|
||||
channel: `discord.TextChannel`, `discord.VoiceChannel`, `discord.StageChannel`, or `None`
|
||||
The channel to be set as modlog channel
|
||||
|
||||
Returns
|
||||
|
||||
Reference in New Issue
Block a user