oceanic.js
Version:
A NodeJS library for interfacing with Discord.
21 lines (20 loc) • 841 B
TypeScript
/** @module Channel */
import Base from "./Base";
import { ChannelTypes } from "../Constants";
import type Client from "../Client";
import type { AnyChannel, RawChannel } from "../types/channels";
import type { JSONChannel } from "../types/json";
/** Represents a channel. */
export default class Channel extends Base {
/** The [type](https://discord.com/developers/docs/resources/channel#channel-object-channel-types) of this channel. */
type: ChannelTypes;
constructor(data: RawChannel, client: Client);
static from<T extends AnyChannel = AnyChannel>(data: RawChannel, client: Client): T;
/** A string that will mention this channel. */
get mention(): string;
/**
* Close a direct message, leave a group channel, or delete a guild channel.
*/
delete(): Promise<void>;
toJSON(): JSONChannel;
}