Skip to content

ThreadChannel

This data type describes all available data about the thread.

Properties

PropertyTypeDescription
idNumberUnique identifier
createdAtDateTimeCreation date and time
nameStringChannel name
typeStringChannel type
mentionStringMention
guildGuildServer information
positionNumberPosition number in channel list (1 is top of the list)
parentCategoryCategory if exists
nsfwBooleantrue if this channel is age restricted

| topic | String | Description (Topic) | | canTalk | Boolean | true if bot can send messages in this channel |

| archived | Boolean | true if thread has been archived | | invitable | Boolean | true if members can invite others | | joined | Boolean | true if bot has joined | | locked | Boolean | true if thread is locked | | pinned | Boolean | true if thread is pinned (forum posts only) | | public | Boolean | true if thread is public | | owner | Member | Thread Owner | | memberCount | Number | The current number of members that have joined this thread (capped at 50) | | messageCount | Number | The current number of messages present in this thread | | totalMessageCount | Number | The total number of messages sent in this thread, including all deleted messages |

Methods

getMessageById(ID)


Returns a message object for specified message ID.

Returns: Message

Warning! Quota

This method can only be invoked 1 times in the same template.

sendMessage(Text)


Sends a simple text message to this channel. Returns true if message has been sent.

Returns: Boolean

Warning! Quota

Following methods have shared quota and can only be invoked 2 times in the same template:

  • sendMessage
  • sendMessageAndGet
  • Embed#send
  • Embed#sendAndGet
  • Embed#update
  • Embed#updateAndGet

sendMessageAndGet(Text)


Sends a simple text message to this channel. Returns result message object if message has been sent.

Returns: Boolean

Warning! Quota

Following methods have shared quota and can only be invoked 2 times in the same template:

  • sendMessage
  • sendMessageAndGet
  • Embed#send
  • Embed#sendAndGet
  • Embed#update
  • Embed#updateAndGet

createEmbed()


Creates a new Embed builder.

Returns: Embed

All rights sniffed.