Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/harmony/src/structures/textChannel.ts>TextChannel

An easy to use Discord API Library for Deno.
Go to Latest
class TextChannel
extends Channel
import { TextChannel } from "https://deno.land/x/harmony@v2.8.0/src/structures/textChannel.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>