Summary
ForumTag cannot be created without setting an emoji even though this is allowed by the API.
Reproduction Steps
- Run
discord.ForumTag(name="foo", emoji=None)
- See the error.
Minimal Reproducible Code
import discord
discord.ForumTag(name="foo", emoji=None)
Expected Results
The code should exist normally.
Actual Results
Traceback (most recent call last):
File "<python-input-1>", line 1, in <module>
discord.ForumTag(name="foo", emoji=None)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jerem\Documents\pycord\pycord\discord\channel.py", line 169, in __init__
raise TypeError(
...<2 lines>...
)
TypeError: emoji must be a GuildEmoji, PartialEmoji, or str and not <class 'NoneType'>
Intents
n/a
System Information
Checklist
Additional Context
The discord docs mention:
At most one of emoji_id and emoji_name may be set to a non-null value.
https://docs.discord.com/developers/resources/channel#forum-tag-object
This does not mean however that either of them should always be set. Both should be allowed to be null.
Summary
ForumTagcannot be created without setting an emoji even though this is allowed by the API.Reproduction Steps
discord.ForumTag(name="foo", emoji=None)Minimal Reproducible Code
Expected Results
The code should exist normally.
Actual Results
Intents
n/a
System Information
Checklist
Additional Context
The discord docs mention:
https://docs.discord.com/developers/resources/channel#forum-tag-object
This does not mean however that either of them should always be set. Both should be allowed to be null.