ForumMedia
Implementation of discords ForumMediaThread object as a Luau builder.
https://discord.com/developers/docs/resources/channel#start-thread-without-message-json-params
Summary
Properties
ForumMedia.appliedTags :: { string }ForumMedia.name :: string?ForumMedia.autoArchiveDuration :: number?ForumMedia.rateLimitPerUser :: number?ForumMedia.message :: messageParams.JSONMethods
ForumMedia:setName(name: string) → ForumMediaThreadForumMedia:setAutoArchiveDuration(duration: number) → ForumMediaThreadForumMedia:setRateLimitPerUser(rateLimit: number) → ForumMediaThreadForumMedia:addTag(rateLimit: string) → ForumMediaThreadForumMedia:setMessage(message: messageParams.JSON) → ForumMediaThreadForumMedia:build() → JSONProperties
Section titled “Properties”appliedTags
Section titled “appliedTags”An array of tag IDs that have been applied to the thread.
The name of the thread.
autoArchiveDuration
Section titled “autoArchiveDuration”Duration in minutes to automatically archive the thread after recent activity.
rateLimitPerUser
Section titled “rateLimitPerUser”Amount of seconds a user has to wait before sending another message.
message
Section titled “message”The message content for the forum thread.
Methods
Section titled “Methods”setName
Section titled “setName”ForumMedia : setName ( name ) -> ForumMediaThread
Sets the name of the forum thread. Name must be between 1-100 characters.
Parameters
| name: string |
Returns
| ForumMediaThread |
setAutoArchiveDuration
Section titled “setAutoArchiveDuration”ForumMedia : setAutoArchiveDuration ( duration ) -> ForumMediaThread
Sets the duration after which the thread will automatically archive. Duration must be one of: 60, 1440, 4320, or 10080 minutes.
Parameters
| duration: number |
Returns
| ForumMediaThread |
setRateLimitPerUser
Section titled “setRateLimitPerUser”ForumMedia : setRateLimitPerUser ( rateLimit ) -> ForumMediaThread
Sets the rate limit per user for the thread in seconds. Rate limit must not exceed 21600 seconds (6 hours).
Parameters
| rateLimit: number |
Returns
| ForumMediaThread |
addTag
Section titled “addTag”ForumMedia : addTag ( rateLimit ) -> ForumMediaThread
Adds a tag to the forum thread. Tags can be used to categorize or filter threads.
Parameters
| rateLimit: string |
Returns
| ForumMediaThread |
setMessage
Section titled “setMessage”ForumMedia : setMessage ( message ) -> ForumMediaThread
Sets the initial message content for the forum thread. The message must be a valid message parameters object.
Parameters
| message: JSON |
Returns
| ForumMediaThread |
ForumMedia : build ( ) -> JSON
Responsible for building the ForumMediaThread JSON that can be parsed by the Discord API.
Returns
| JSON |
Functions
Section titled “Functions”ForumMedia . new ( resource ) -> ForumMediaThread
Responsible for creating a new ForumMediaThread.