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

x/harmony/src/managers/channels.ts>ChannelsManager

An easy to use Discord API Library for Deno.
Go to Latest
class ChannelsManager
import { ChannelsManager } from "https://deno.land/x/harmony@v2.6.0/src/managers/channels.ts";

Constructors

new
ChannelsManager(client: Client)

Methods

array(): Promise<Channel[]>
editMessage(
channel: string | TextChannel,
message: Message | string,
text?: string | MessageOptions,
option?: MessageOptions,
): Promise<Message>
fetch<T = Channel>(id: string): Promise<T>

Fetches a Channel by ID, cache it, resolve it

get<T extends Channel = Channel>(key: string): Promise<T | undefined>
getPinnedMessages(channel: string | TextChannel): Promise<Collection<string, Message>>
getUserDM(user: User | string): Promise<string | undefined>
messageCacheSize(channel?: string | TextChannel): Promise<number>

Get cache size for messages. Returns total messages cache size if channel param is not given

pinMessage(channel: string | TextChannel, message: string | Message): Promise<void>
sendMessage(
channel: string | TextChannel,
content?: string | AllMessageOptions,
): Promise<Message>
setUserDM(user: User | string, id: string): Promise<void>
unpinMessage(channel: string | TextChannel, message: string | Message): Promise<void>