Skip to content

Commit 0d73cf7

Browse files
committed
🩹 Add type property
1 parent bb8bc7b commit 0d73cf7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

discord/channel.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1355,6 +1355,11 @@ async def create_thread(
13551355
await msg.delete(delay=delete_message_after)
13561356
return ret
13571357

1358+
@property
1359+
def type(self) -> ChannelType:
1360+
"""The channel's type."""
1361+
return ChannelType.forum
1362+
13581363

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

1570+
@property
1571+
def type(self) -> ChannelType:
1572+
"""The channel's type."""
1573+
return ChannelType.media
1574+
15651575

15661576
class VocalGuildChannel(discord.abc.Connectable, discord.abc.GuildChannel, Hashable):
15671577
__slots__ = (

0 commit comments

Comments
 (0)