TextBasedChannels
TextBasedChannels
Section titled “TextBasedChannels”Kind: global class
- TextBasedChannels
- new TextBasedChannels([data], guildId, client)
- .messages ⇒
MessageManager - .send(options) ⇒
Promise - .bulkDelete(messages, reason) ⇒
Promise.<void> - .setNsfw(nsfw, reason) ⇒
Promise - .setRateLimitPerUser(ratelimit, reason) ⇒
Promise - .triggerTyping() ⇒
Promise.<void>
new TextBasedChannels([data], guildId, client)
Section titled “new TextBasedChannels([data], guildId, client)”Constructs a new instance of the Channel class.
| Param | Type | Description |
|---|---|---|
| [data] | Object | The data object containing the channel information. |
| guildId | string | The ID of the guild that the channel belongs to. |
| client | Client | The client instance. |
textBasedChannels.messages ⇒ MessageManager
Section titled “textBasedChannels.messages ⇒ MessageManager”Get the message manager for this channel.
Kind: instance property of TextBasedChannels
Returns: MessageManager - The message manager object for this channel.
textBasedChannels.send(options) ⇒ Promise
Section titled “textBasedChannels.send(options) ⇒ Promise”Sends a message using the specified options.
Kind: instance method of TextBasedChannels
Returns: Promise - A promise that resolves when the message is sent.
| Param | Type | Description |
|---|---|---|
| options | object | The options for sending the message. |
textBasedChannels.bulkDelete(messages, reason) ⇒ Promise.<void>
Section titled “textBasedChannels.bulkDelete(messages, reason) ⇒ Promise.<void>”Bulk deletes the specified messages from the channel.
Kind: instance method of TextBasedChannels
Returns: Promise.<void> - A promise that resolves when the messages are deleted.
| Param | Type | Description |
|---|---|---|
| messages | Array.<Message> | The messages to delete. |
| reason | string | The reason for deleting the messages. |
textBasedChannels.setNsfw(nsfw, reason) ⇒ Promise
Section titled “textBasedChannels.setNsfw(nsfw, reason) ⇒ Promise”Sets the NSFW (Not Safe for Work) flag for the current item.
Kind: instance method of TextBasedChannels
Returns: Promise - - A promise that resolves when the NSFW flag is successfully set.
| Param | Type | Description |
|---|---|---|
| nsfw | boolean | The NSFW flag value to set. |
| reason | string | The reason for setting the NSFW flag. |
textBasedChannels.setRateLimitPerUser(ratelimit, reason) ⇒ Promise
Section titled “textBasedChannels.setRateLimitPerUser(ratelimit, reason) ⇒ Promise”Sets the rate limit per user for a specific action.
Kind: instance method of TextBasedChannels
Returns: Promise - - A promise that resolves when the rate limit is successfully set.
| Param | Type | Description |
|---|---|---|
| ratelimit | number | The new rate limit value to set. |
| reason | string | The reason for setting the rate limit. |
textBasedChannels.triggerTyping() ⇒ Promise.<void>
Section titled “textBasedChannels.triggerTyping() ⇒ Promise.<void>”Triggers a typing indicator in the channel where this method is called.
Kind: instance method of TextBasedChannels
Returns: Promise.<void> - - A promise that resolves when the typing indicator is triggered.