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
topicStringDescription (Topic)
canTalkBooleantrue if bot can send messages in this channel
archivedBooleantrue if thread has been archived
invitableBooleantrue if members can invite others
joinedBooleantrue if bot has joined
lockedBooleantrue if thread is locked
pinnedBooleantrue if thread is pinned (forum posts only)
publicBooleantrue if thread is public
ownerMemberThread Owner
memberCountNumberThe current number of members that have joined this thread (capped at 50)
messageCountNumberThe current number of messages present in this thread
totalMessageCountNumberThe 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.