Skip to content

ForumMedia

Implementation of discords ForumMediaThread object as a Luau builder.

https://discord.com/developers/docs/resources/channel#start-thread-without-message-json-params

ForumMedia.appliedTags  :: { string }

An array of tag IDs that have been applied to the thread.

ForumMedia.name  :: string?

The name of the thread.

ForumMedia.autoArchiveDuration  :: number?

Duration in minutes to automatically archive the thread after recent activity.

ForumMedia.rateLimitPerUser  :: number?

Amount of seconds a user has to wait before sending another message.

ForumMedia.message  :: JSON

The message content for the forum thread.

ForumMedia : setName ( name )  -> ForumMediaThread

Sets the name of the forum thread. Name must be between 1-100 characters.

Parameters

name: string

Returns

ForumMediaThread
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
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
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
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
ForumMedia . new ( resource )  -> ForumMediaThread

Responsible for creating a new ForumMediaThread.

Parameters

resource: {
name: string?,
autoArchiveDuration: number?,
rateLimitPerUser: number?,
}

Returns

ForumMediaThread