ThreadChannel
ThreadChannel ⇐ TextBasedChannels
Represents a thread channel in Discord.
Kind: global class
Extends: TextBasedChannels
- ThreadChannel ⇐
TextBasedChannels
- new ThreadChannel([data], guildId, client)
- .join() ⇒
Promise.<Group>
- .add(member) ⇒
Promise
- .remove(user) ⇒
Promise.<void>
- .fetchOwner(options) ⇒
Promise.<(Object|null)>
- .setArchived(archived, reason) ⇒
Promise
- .setLocked(locked, reason) ⇒
Promise
- .setAutoArchiveDuration(autoArchiveDuration, reason) ⇒
Promise
- .setInvitable(invitable, reason) ⇒
Promise.<void>
- .setFlags(flags, reason) ⇒
Promise.<void>
new ThreadChannel([data], guildId, client)
Constructs a new instance of the ThreadChannel class.
Param | Type | Description |
---|---|---|
[data] | Object | The data object containing information about the thread channel. |
guildId | string | The ID of the guild that the thread channel belongs to. |
client | Client | The 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.
Param | Type | Description |
---|---|---|
member | GuildMember | The 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.
Param | Type | Description |
---|---|---|
user | User | The 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.
Param | Type | Description |
---|---|---|
options | Object | Additional 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.
Param | Type | Description |
---|---|---|
archived | boolean | The archived status to set. |
reason | string | The 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.
Param | Type | Description |
---|---|---|
locked | boolean | The locked status to set. |
reason | string | The 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.
Param | Type | Description |
---|---|---|
autoArchiveDuration | number | The new auto archive duration in seconds. |
reason | string | The 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.
Param | Type | Description |
---|---|---|
invitable | boolean | The new value for the invitable property. |
reason | string | The 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.
Param | Type | Description |
---|---|---|
flags | any | The flags to set. |
reason | string | The reason for setting the flags. |