NoMessageThread
Implementation of discords NoMessageThread object as a Luau builder.
https://discord.com/developers/docs/resources/channel#start-thread-without-message-json-params
Summary
Properties
NoMessageThread.name :: string?NoMessageThread.autoArchiveDuration :: number?NoMessageThread.type :: api_types.ChannelType?NoMessageThread.invitable :: boolean?NoMessageThread.rateLimitPerUser :: number?Methods
NoMessageThread:setName(name: string) → NoMessageThreadNoMessageThread:setAutoArchiveDuration(duration: number) → NoMessageThreadNoMessageThread:setType(type: apiTypes.ChannelType) → NoMessageThreadNoMessageThread:setInvitable(invitable: boolean) → NoMessageThreadNoMessageThread:setRateLimitPerUser(rateLimit: number) → NoMessageThreadNoMessageThread:build() → JSONProperties
Section titled “Properties”The name of the thread that is displayed.
autoArchiveDuration
Section titled “autoArchiveDuration”Duration in minutes to automatically archive the thread after recent activity.
The type of thread channel.
invitable
Section titled “invitable”Whether non-moderators can add other non-moderators to the thread.
rateLimitPerUser
Section titled “rateLimitPerUser”Amount of seconds a user has to wait before sending another message.
Methods
Section titled “Methods”setName
Section titled “setName”NoMessageThread : setName ( name ) -> NoMessageThread
Sets the name of the thread. Name must be between 1-100 characters.
Parameters
| name: string |
Returns
| NoMessageThread |
setAutoArchiveDuration
Section titled “setAutoArchiveDuration”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 |
setType
Section titled “setType”NoMessageThread : setType ( type ) -> NoMessageThread
Sets the type of thread channel. Must be a valid Discord channel type.
Parameters
| type: ChannelType |
Returns
| NoMessageThread |
setInvitable
Section titled “setInvitable”NoMessageThread : setInvitable ( invitable ) -> NoMessageThread
Sets whether non-moderators can add other non-moderators to the thread.
Parameters
| invitable: boolean |
Returns
| NoMessageThread |
setRateLimitPerUser
Section titled “setRateLimitPerUser”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 |
Functions
Section titled “Functions”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 |