Skip to content

NoMessageThread

Implementation of discords NoMessageThread object as a Luau builder.

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

NoMessageThread.name  :: string?

The name of the thread that is displayed.

NoMessageThread.autoArchiveDuration  :: number?

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

NoMessageThread.type  :: ChannelType?

The type of thread channel.

NoMessageThread.invitable  :: boolean?

Whether non-moderators can add other non-moderators to the thread.

NoMessageThread.rateLimitPerUser  :: number?

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

NoMessageThread : setName ( name )  -> NoMessageThread

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

Parameters

name: string

Returns

NoMessageThread
NoMessageThread : setAutoArchiveDuration ( duration )  -> NoMessageThread

Sets the duration in minutes before the thread is automatically archived. Valid values are 60, 1440, 4320, or 10080.

Parameters

duration: number

Returns

NoMessageThread
NoMessageThread : setType ( type )  -> NoMessageThread

Sets the type of thread channel. Must be a valid Discord channel type.

Parameters

type: ChannelType

Returns

NoMessageThread
NoMessageThread : setInvitable ( invitable )  -> NoMessageThread

Sets whether non-moderators can add other non-moderators to the thread.

Parameters

invitable: boolean

Returns

NoMessageThread
NoMessageThread : setRateLimitPerUser ( rateLimit )  -> NoMessageThread

Sets the amount of seconds a user has to wait before sending another message. Must be less than or equal to 21600 seconds (6 hours).

Parameters

rateLimit: number

Returns

NoMessageThread
NoMessageThread : build ( )  -> JSON

Responsible for building the NoMessageThread JSON that can be parsed by the Discord API.

Returns

JSON
NoMessageThread . new ( resource )  -> NoMessageThread

Responsible for creating a new NoMessageThread.

Parameters

resource: {
name: string?,
autoArchiveDuration: number?,
type: apiTypes.ChannelType?,
invitable: boolean?,
rateLimitPerUser: number?,
}

Returns

NoMessageThread