Skip to main content
Module

x/commandis/mod.ts>TextChannel

Official framework for Corddis lib ( for Deno only )
Latest
class TextChannel
extends Channel
Re-export
import { TextChannel } from "https://deno.land/x/commandis@v0.6.5/mod.ts";

Constructors

new
TextChannel(
client: Client,
guild?: Guild,
)

Properties

pins: Message[]
pinsUpdated: Date | null
pinsViewed: Date | null
webhooks: Webhook[]

Methods

createCollector(filter: (msg: Message) => boolean, options: CollectorOptions): Collector<Message>

Creates a message collector for a specified channel.

crosspost(id: Snowflake): Promise<Message>

Crossposts a message

deleteMessage(id: string): Promise<boolean>

Deletes a message.

deleteMessagesBulk(messages: Snowflake[]): Promise<boolean>

Deletes a message.

editMessage(id: string, data: (MessageEditParamsType | string)): Promise<Message>

Edits a previously sent message.

fetchMessage(id: string): Promise<Message>

Fetches a message from channel.

Fetches messages from channel.

fetchPins(): Promise<Message[]>

Fetch channel pins.

fetchWebhooks(): Promise<Webhook[]>

Fetches channel webhooks.

follow(webhook_channel_id: string): Promise<NewsFollowedChannelType>

Follows a news channel to another text channel.

pin(id: Snowflake): Promise<boolean>

Pins a message.

react(id: string, emoji: string): Promise<boolean>

Reacts to a message with emoji.

sendFile(path: string): Promise<Message>

Sends a file to text channel.

Sends message to text channel. channel.sendMessage({ content: "Hello!" })

typing(): Promise<boolean>

Triggers typing indicator.

unreact(
id: string,
emoji: string,
user?: Snowflake,
): Promise<boolean>

Deletes previous added reaction from a message.

unreactAll(id: string, emoji?: string): Promise<boolean>

Deletes all previous added reaction from a message.