diff --git a/interactions/models/discord/channel.py b/interactions/models/discord/channel.py index 6869413dd..9c2260282 100644 --- a/interactions/models/discord/channel.py +++ b/interactions/models/discord/channel.py @@ -1600,6 +1600,84 @@ async def create_stage_channel( reason=reason, ) + async def create_forum_channel( + self, + name: str, + topic: Absent[Optional[str]] = MISSING, + position: Absent[Optional[int]] = MISSING, + permission_overwrites: Absent[ + Union[dict, PermissionOverwrite, List[Union[dict, PermissionOverwrite]]] + ] = MISSING, + bitrate: int = 64000, + user_limit: int = 0, + reason: Absent[Optional[str]] = MISSING, + ) -> "GuildForum": + """ + Create a guild forum channel within this category. + + Args: + name: The name of the channel + topic: The topic of the channel + position: The position of the channel in the channel list + permission_overwrites: Permission overwrites to apply to the channel + bitrate: The bitrate of this channel, only for voice + user_limit: The max users that can be in this channel, only for voice + reason: The reason for creating this channel + + Returns: + The newly created forum channel. + + """ + return await self.create_channel( + channel_type=ChannelType.GUILD_FORUM, + name=name, + topic=topic, + position=position, + permission_overwrites=permission_overwrites, + bitrate=bitrate, + user_limit=user_limit, + reason=reason, + ) + + async def create_media_channel( + self, + name: str, + topic: Absent[Optional[str]] = MISSING, + position: Absent[Optional[int]] = MISSING, + permission_overwrites: Absent[ + Union[dict, PermissionOverwrite, List[Union[dict, PermissionOverwrite]]] + ] = MISSING, + bitrate: int = 64000, + user_limit: int = 0, + reason: Absent[Optional[str]] = MISSING, + ) -> "GuildMedia": + """ + Create a guild media channel within this category. + + Args: + name: The name of the channel + topic: The topic of the channel + position: The position of the channel in the channel list + permission_overwrites: Permission overwrites to apply to the channel + bitrate: The bitrate of this channel, only for voice + user_limit: The max users that can be in this channel, only for voice + reason: The reason for creating this channel + + Returns: + The newly created media channel. + + """ + return await self.create_channel( + channel_type=ChannelType.GUILD_MEDIA, + name=name, + topic=topic, + position=position, + permission_overwrites=permission_overwrites, + bitrate=bitrate, + user_limit=user_limit, + reason=reason, + ) + @attrs.define(eq=False, order=False, hash=False, kw_only=True) class GuildNews(GuildChannel, MessageableMixin, InvitableMixin, ThreadableMixin, WebhookMixin): diff --git a/interactions/models/discord/guild.py b/interactions/models/discord/guild.py index f70a38d25..819ba43a7 100644 --- a/interactions/models/discord/guild.py +++ b/interactions/models/discord/guild.py @@ -1204,6 +1204,90 @@ async def create_stage_channel( reason=reason, ) + async def create_forum_channel( + self, + name: str, + topic: Absent[Optional[str]] = MISSING, + position: Absent[Optional[int]] = MISSING, + permission_overwrites: Absent[ + Union[dict, "models.PermissionOverwrite", List[Union[dict, "models.PermissionOverwrite"]]] + ] = MISSING, + category: Absent[Union[Snowflake_Type, "models.GuildCategory"]] = MISSING, + bitrate: int = 64000, + user_limit: int = 0, + reason: Absent[Optional[str]] = MISSING, + ) -> "models.GuildForum": + """ + Create a guild forum channel. + + Args: + name: The name of the channel + topic: The topic of the channel + position: The position of the channel in the channel list + permission_overwrites: Permission overwrites to apply to the channel + category: The category this channel should be within + bitrate: The bitrate of this channel, only for voice + user_limit: The max users that can be in this channel, only for voice + reason: The reason for creating this channel + + Returns: + The newly created forum channel. + + """ + return await self.create_channel( + channel_type=ChannelType.GUILD_FORUM, + name=name, + topic=topic, + position=position, + permission_overwrites=permission_overwrites, + category=category, + bitrate=bitrate, + user_limit=user_limit, + reason=reason, + ) + + async def create_media_channel( + self, + name: str, + topic: Absent[Optional[str]] = MISSING, + position: Absent[Optional[int]] = MISSING, + permission_overwrites: Absent[ + Union[dict, "models.PermissionOverwrite", List[Union[dict, "models.PermissionOverwrite"]]] + ] = MISSING, + category: Absent[Union[Snowflake_Type, "models.GuildCategory"]] = MISSING, + bitrate: int = 64000, + user_limit: int = 0, + reason: Absent[Optional[str]] = MISSING, + ) -> "models.GuildMedia": + """ + Create a guild media channel. + + Args: + name: The name of the channel + topic: The topic of the channel + position: The position of the channel in the channel list + permission_overwrites: Permission overwrites to apply to the channel + category: The category this channel should be within + bitrate: The bitrate of this channel, only for voice + user_limit: The max users that can be in this channel, only for voice + reason: The reason for creating this channel + + Returns: + The newly created media channel. + + """ + return await self.create_channel( + channel_type=ChannelType.GUILD_MEDIA, + name=name, + topic=topic, + position=position, + permission_overwrites=permission_overwrites, + category=category, + bitrate=bitrate, + user_limit=user_limit, + reason=reason, + ) + async def create_category( self, name: str,