Error while trying create thread in forum (DiscordExtensions)

Code:

DiscordChannel channel = _guild.Channels[new Ext.Discord.Entities.Snowflake(1267257929405436014)];
var threadCreate = new ThreadCreate()
{
	Name = "New thread #1",
	AutoArchiveDuration = 1440,
	Type = ChannelType.GuildPublicThread
};

channel.StartThreadWithoutMessage(_client, threadCreate, thread =>
{
	thread.CreateMessage(_client, new MessageCreate()
	{
		Content = "Message in thread"
	});
});

Forum:
https://imgur.com/a/FM087UV

Got this:

[Discord Extension] [Error]: Discord API has returned error Discord Code: 50035 Discord Error: Invalid Form Body Request: [POST] https://discord.com/api/v9/channels/1267257929405436014/threads (Response Code: BadRequest) Content-Type: application/json
Discord Errors: {
"message": {
"_errors": [
{
"code": "BASE_TYPE_REQUIRED",
"message": "This field is required"
}
]
}
}
Request Body:
{"name":"New thread #1","auto_archive_duration":1440,"type":11}

 

GuildPrivateThread and GuildPublicThread not working

		public class ThreadCreateNew
		{
			[JsonProperty("name")]
			public string Name { get; set; }

			[JsonProperty("auto_archive_duration")]
			public int? AutoArchiveDuration { get; set; }

			[JsonProperty("type")]
			public int Type { get; set; } = 15;

			[JsonProperty("message")]
			public MessageCreate Message { get; set; }
		}

I make this:

_client.Bot.Rest.DoRequest($"/channels/{channel.Id}/threads", Oxide.Ext.Discord.Entities.Api.RequestMethod.POST, new ThreadCreateNew()
{
	Name = "123",
	Message = new MessageCreate()
	{
		Content = "lox"
	}
}, null, null);
And its work

I suggest updating to Discord Extension 3.0 as that is the currently supported version. I tested your code there and it's working fine for me.

 

Client.Bot.Servers.FirstOrDefault().Value.Channels[new Snowflake(559760351852363787)].StartThreadWithoutMessage(Client, new ThreadCreate
{
    Name = "New thread #1",
    AutoArchiveDuration = 1440,
    Type = ChannelType.GuildPublicThread
}).Then(c => c.CreateMessage(Client, new MessageCreate
{
    Content = "Message in thread"
}));
MJSU

I suggest updating to Discord Extension 3.0 as that is the currently supported version. I tested your code there and it's working fine for me.

 

Client.Bot.Servers.FirstOrDefault().Value.Channels[new Snowflake(559760351852363787)].StartThreadWithoutMessage(Client, new ThreadCreate
{
    Name = "New thread #1",
    AutoArchiveDuration = 1440,
    Type = ChannelType.GuildPublicThread
}).Then(c => c.CreateMessage(Client, new MessageCreate
{
    Content = "Message in thread"
}));

To create a topic on the forum, you need id = 15, which is not in my version :/
I don’t know how in 3.0