Skip to content

ThreadChannel

ThreadChannel ⇐ TextBasedChannels

Represents a thread channel in Discord.

Kind: global class
Extends: TextBasedChannels

new ThreadChannel([data], guildId, client)

Constructs a new instance of the ThreadChannel class.

ParamTypeDescription
[data]ObjectThe data object containing information about the thread channel.
guildIdstringThe ID of the guild that the thread channel belongs to.
clientClientThe client instance.

threadChannel.join() ⇒ Promise.<Group>

Asynchronously joins all members of a group.

Kind: instance method of ThreadChannel
Returns: Promise.<Group> - A promise that resolves to the joined group.

threadChannel.add(member) ⇒ Promise

Adds a member to the collection asynchronously.

Kind: instance method of ThreadChannel
Returns: Promise - A promise that resolves when the member is added.

ParamTypeDescription
memberGuildMemberThe member to add.

threadChannel.remove(user) ⇒ Promise.<void>

Removes a user from the members list.

Kind: instance method of ThreadChannel
Returns: Promise.<void> - - A promise that resolves when the user is successfully removed.

ParamTypeDescription
userUserThe user to remove.

threadChannel.fetchOwner(options) ⇒ Promise.<(Object|null)>

Fetches the owner of the object.

Kind: instance method of ThreadChannel
Returns: Promise.<(Object|null)> - - A promise that resolves to the owner object if found, or null if the ownerId is not set.

ParamTypeDescription
optionsObjectAdditional options for the fetch operation.

threadChannel.setArchived(archived, reason) ⇒ Promise

Sets the archived status and reason for an item.

Kind: instance method of ThreadChannel
Returns: Promise - - A promise that resolves when the item is successfully edited.

ParamTypeDescription
archivedbooleanThe archived status to set.
reasonstringThe reason for archiving the item.

threadChannel.setLocked(locked, reason) ⇒ Promise

Sets the locked status and reason for an item.

Kind: instance method of ThreadChannel
Returns: Promise - - A promise that resolves when the edit is complete.

ParamTypeDescription
lockedbooleanThe locked status to set.
reasonstringThe reason for locking the item.

threadChannel.setAutoArchiveDuration(autoArchiveDuration, reason) ⇒ Promise

Sets the auto archive duration for a specific item and provides a reason for the change.

Kind: instance method of ThreadChannel
Returns: Promise - - A promise that resolves when the operation is complete.

ParamTypeDescription
autoArchiveDurationnumberThe new auto archive duration in seconds.
reasonstringThe reason for changing the auto archive duration.

threadChannel.setInvitable(invitable, reason) ⇒ Promise.<void>

Sets the invitable property and reason for the object.

Kind: instance method of ThreadChannel
Returns: Promise.<void> - - A promise that resolves when the edit is complete.

ParamTypeDescription
invitablebooleanThe new value for the invitable property.
reasonstringThe reason for the change.

threadChannel.setFlags(flags, reason) ⇒ Promise.<void>

Sets the flags and reason for an object.

Kind: instance method of ThreadChannel
Returns: Promise.<void> - - A promise that resolves when the flags are set.

ParamTypeDescription
flagsanyThe flags to set.
reasonstringThe reason for setting the flags.