diff --git a/discord/channel.py b/discord/channel.py index 150238a41..9d3542e5b 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -2006,7 +2006,7 @@ class ForumTag(Hashable): __slots__ = ('name', 'id', 'moderated', 'emoji') - def __init__(self, *, name: str, emoji: Optional[EmojiInputType], moderated: bool = False) -> None: + def __init__(self, *, name: str, emoji: Optional[EmojiInputType] = None, moderated: bool = False) -> None: self.name: str = name self.id: int = 0 self.moderated: bool = moderated @@ -2015,8 +2015,8 @@ class ForumTag(Hashable): self.emoji = emoji._to_partial() elif isinstance(emoji, str): self.emoji = PartialEmoji.from_str(emoji) - else: - raise TypeError(f'emoji must be a Emoji, PartialEmoji, or str not {emoji.__class__.__name__}') + elif emoji is not None: + raise TypeError(f'emoji must be a Emoji, PartialEmoji, str or None not {emoji.__class__.__name__}') @classmethod def from_data(cls, *, state: ConnectionState, data: ForumTagPayload) -> Self: