Skip to main content
Module

x/harmony/mod.ts>TextChannel

An easy to use Discord API Library for Deno.
Latest
class TextChannel
extends Channel
Re-export
import { TextChannel } from "https://deno.land/x/harmony@v2.9.0/mod.ts";

Channel object for Text Channel type

Constructors

new
TextChannel(client: Client, data: TextChannelPayload)

Properties

optional
lastMessageID: string
optional
lastPinTimestamp: string
messages: MessagesManager

Methods

addReaction(message: Message | string, emoji: Emoji | string): Promise<void>

Add a reaction to a Message in this Channel

editMessage(
message: Message | string,
text?: string,
option?: MessageOptions,
): Promise<Message>
fetchMessages(options?: { limit?: number; around?: Message | string; before?: Message | string; after?: Message | string; }): Promise<Collection<string, Message>>

Fetch Messages of a Channel

fetchWebhooks(): Promise<Webhook[]>

Fetches the webhooks associated with a channel

getPinnedMessages(): Promise<Collection<string, Message>>
pinMessage(message: string | Message): Promise<void>
removeReaction(
message: Message | string,
emoji: Emoji | string,
user?: User | Member | string,
): Promise<void>

Remove Reaction from a Message in this Channel

send(
content?: string | AllMessageOptions,
reply?: Message,
): Promise<Message>

Trigger the typing indicator. NOT recommended to be used by bots unless you really want to.

unpinMessage(message: string | Message): Promise<void>