Method CreatePostAsync
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
CreatePostAsync(string, DiscordMessageBuilder, int?, IEnumerable<ForumPostTag>?, string)
Creates a forum post.
public Task<DiscordThreadChannel> CreatePostAsync(string name, DiscordMessageBuilder builder, int? rateLimitPerUser = null, IEnumerable<ForumPostTag>? tags = null, string reason = null)
Parameters
name
stringThe name of the post.
builder
DiscordMessageBuilderThe message of the post.
rateLimitPerUser
int?The per user ratelimit, aka slowdown.
tags
IEnumerable<ForumPostTag>The tags to add on creation.
reason
stringAudit log reason.
Returns
- Task<DiscordThreadChannel>
The created thread.
Exceptions
- UnauthorizedException
Thrown when the client does not have the SendMessages permission.
- NotFoundException
Thrown when the guild hasn't enabled threads atm.
- BadRequestException
Thrown when an invalid parameter was provided.
- ServerErrorException
Thrown when Discord is unable to process the request.