Skip to content

Commit

Permalink
🩹 Add type property
Browse files Browse the repository at this point in the history
  • Loading branch information
Paillat-dev committed Nov 9, 2024
1 parent bb8bc7b commit 0d73cf7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions discord/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -1355,6 +1355,11 @@ async def create_thread(
await msg.delete(delay=delete_message_after)
return ret

@property
def type(self) -> ChannelType:
"""The channel's type."""
return ChannelType.forum


class MediaChannel(ForumChannel):
"""Represents a Discord media channel. Subclass of :class:`ForumChannel`.
Expand Down Expand Up @@ -1562,6 +1567,11 @@ async def edit(self, *, reason=None, **options):
# the payload will always be the proper channel payload
return self.__class__(state=self._state, guild=self.guild, data=payload) # type: ignore

@property
def type(self) -> ChannelType:
"""The channel's type."""
return ChannelType.media


class VocalGuildChannel(discord.abc.Connectable, discord.abc.GuildChannel, Hashable):
__slots__ = (
Expand Down

0 comments on commit 0d73cf7

Please sign in to comment.