Channel
Implementation of a discord Channel as a luau builder.
https://discord.com/developers/docs/resources/guild#create-guild-channel
Properties
id
The id of the channel.
name
The name of the channel.
type
The type of the channel.
position
Position of the channel in the list.
icon
The base64 icon for the channel (used in DMs).
flags
Bitfield flags for the channel.
topic
The topic of the text channel.
rateLimitPerUser
Slowmode in seconds for users.
parentId
Parent category ID.
nsfw
Whether the channel is marked as NSFW.
defaultAutoArchiveDuration
Default auto archive duration in minutes.
defaultThreadRateLimitPerUser
Slowmode in seconds for thread messages.
defaultReactionEmoji
Default reaction emoji object.
availableTags
Available forum tags.
defaultSortOrder
Default sort order for threads.
defaultForumLayout
Default forum layout type.
videoQualityMode
Voice channel video quality mode.
rtcRegion
Voice region id for the channel.
userLimit
Maximum number of users allowed in the voice channel.
bitrate
Bitrate of the voice channel in bits.
Methods
The Channel instance has no set methods!
Functions
setName
Channel . setName () -> ()
self: Channel
tagName: string
Set the name of this Channel
setType
Channel . setType () -> ()
self: Channel
channelType: apiTypes.ChannelType
Set the Type of channel this is.
setPosition
Channel . setPosition () -> ()
self: Channel
channelPosition: number
Sets the position of the channel in the discord channels list. Channels with the same position are sorted by id.
setOverwrites
Adds an overwrite object to the channel’s permission overwrites. Channel overwrites are responsible for handling user/role permission on a specific channel.
setTopic
Channel . setTopic () -> ()
self: Channel
channelTopic: string
Sets the channels topic, topics appear at the top of the discord app and help to inform players about the channel’s purpose.
setBitrate
Channel . setBitrate () -> ()
self: Channel
bitrate: number
Sets the bitrate of the voice channel, the bitrate (in bits) of the voice or stage channel.
setUserLimit
Channel . setUserLimit () -> ()
self: Channel
userLimit: number?
The user limit of the voice channel. The user limit of a voice channel is the maximum number of users allowed in the channel at one time.
setRateLimitPerUser
Channel . setRateLimitPerUser () -> ()
self: Channel
rateLimitPerUser: number?
Amount of seconds a user has to wait before sending another message. Bots and users with certain permissions are unaffected.
setParentId
Channel . setParentId () -> ()
self: Channel
parentId: apiTypes.Snowflake?
Set the parent of the channel. Channel parents are categories and can help organize a discord guild.
setNSFW
Channel . setNSFW () -> ()
self: Channel
isNSFW: boolean
Set whether this channel is NSFW or not.
setVoiceRegion
Channel . setVoiceRegion () -> ()
self: Channel
voiceRegionId: string
Set the voice region (requires querying voice region ids). Voice regions are regions that Discord uses to host voice channels.
setVideoQualityMode
Channel . setVideoQualityMode () -> ()
self: Channel
videoQualityMode: apiTypes.VideoQualityMode
Sets the video quality mode of the voice channel.
setDefaultAutoArchiveDuration
Channel . setDefaultAutoArchiveDuration () -> ()
self: Channel
autoArchiveDuration: number
Sets the default auto archive duration for the channel. This is the default duration in minutes for newly created threads to automatically archive after recent activity.
setDefaultReactionEmoji
Channel . setDefaultReactionEmoji () -> ()
self: Channel
defaultReactionEmoji: apiTypes.DefaultReactionObject
Sets the default reaction emoji for either a forum or media channel.
setForumTags
Specify channel forum tags that are available to the channel.
setDefaultSortOrder
Channel . setDefaultSortOrder () -> ()
self: Channel
sortOrder: apiTypes.ForumSortOrder
Sets the default sort order for the channel.
setDefaultForumLayout
Channel . setDefaultForumLayout () -> ()
self: Channel
forumLayout: apiTypes.ForumLayout
Sets the default forum layout for the channel.
setDefaultThreadRateLimitPerUser
Channel . setDefaultThreadRateLimitPerUser () -> ()
self: Channel
threadRateLimitPerUser: number
Sets the default thread rate limit per user for the channel.
setFlags
Channel . setFlags () -> ()
self: Channel
bitflags: number
Sets the channel flags using a bitfield value.
setIcon
Channel . setIcon () -> ()
self: Channel
iconData: string
Sets the channel icon using the provided icon data.
build
Channel . build () -> ()
self: Channel
Responsible for building the channel object that the Discord API can understand.
new
Channel . new () -> ()
resource: {
channelName: string?,
channelType: apiTypes.ChannelType?,
channelPosition: number?,
channelPermissionOverwrites: { apiTypes.OverwriteObject,
}
Constructor for the Discord Channel Builder.