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
namestringThe name of the post.
builderDiscordMessageBuilderThe message of the post.
rateLimitPerUserint?The per user ratelimit, aka slowdown.
tagsIEnumerable<ForumPostTag>The tags to add on creation.
reasonstringAudit 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.