Skip to content

[Bug]: Fails to Create Forum Channel #74

Open
@malikmajai

Description

@malikmajai

Description

I am not able to create a forum channel. Here is my code:

GUILD_ID = 0
CATEGORY_ID = 0
guild: discord.Guild = bot.get_guild(GUILD_ID)
category: discord.CategoryChannel = bot.get_channel(CATEGORY_ID)
await guild.create_forum_channel(name='Test', category=category)
    ```
 

### Branch used

developer

### The Python version you are using.

Python 3.10

### What version (and release) of the library are you using

2.0a643+g33f5246

### System info

Windows 11

### Full Traceback (Error)

```shell
Traceback (most recent call last):
  File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 454, in _run_event
    await coro(*args, **kwargs)
  File "d:\Bots\illegalshirts\main.py", line 27, in on_ready
    await guild.create_forum_channel(name='Test', category=category)
  File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\guild.py", line 1632, in create_forum_channel
    data = await self._create_channel(
  File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\guild.py", line 1359, in _create_channel 
    raise InvalidArgument(
discord.errors.InvalidArgument: None is not a valid default_auto_archive_duration

Contact info

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions