Skip to content

Channel

HimmelKreis4865 edited this page Jun 26, 2022 · 2 revisions

Types

DM - Channels

  • DMChannel The default dm channel between two users
  • DMGroupChannel A dm channel between three or more users

Guild - Channels

  • GuildCategoryChannel A parent of text / voice channels
  • GuildTextChannel The basic text channel to write in
  • GuildNewsChannel A text channel other servers can follow up
  • GuildVoiceChannel The basic voice channel to speak in
  • GuildStageVoiceChannel A voice - event channel

Documentation

Text Channel

TextChannel->fetchMessage(messageId: int): Completable(Message)

Fetches a message by id

TextChannel->fetchMessages(SearchFilter): Completable(Message[])

Fetches multiple messages by a specific search filter. Possible options:

SearchFilter->setAfter(messageId: int)
SearchFilter->setBefore(messageId: int)
SearchFilter->setAround(messageId: int)
SearchFilter->setLimit(int(1-100))

Returns an array of all messages in format of messageId => Message

TextChannel->send(Senable): Completable(Message)

Sends a message in the channel. Head over to Message Builder

Message Builder

MessageBuilder::build(content: string, tts: bool)

This returns a MessageBuilder instance that you can use to further edit the message:

Add an Embed to a message:

MessageBuilder->addEmbed(Embed)

Embed details

Add an Attachment to a message:

MessageBuilder->addAttachment(Attachment)

Attachment details

Clone this wiki locally