Skip to content

TextBasedChannels

TextBasedChannels

Kind: global class

new TextBasedChannels([data], guildId, client)

Constructs a new instance of the Channel class.

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

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

Sends a message using the specified options.

Kind: instance method of TextBasedChannels
Returns: Promise - A promise that resolves when the message is sent.

ParamTypeDescription
optionsobjectThe options for sending the message.

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.

ParamTypeDescription
messagesArray.<Message>The messages to delete.
reasonstringThe reason for deleting the messages.

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.

ParamTypeDescription
nsfwbooleanThe NSFW flag value to set.
reasonstringThe reason for setting the NSFW flag.

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.

ParamTypeDescription
ratelimitnumberThe new rate limit value to set.
reasonstringThe reason for setting the rate limit.

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.