UNPKG

guilded.ts

Version:

A powerful NPM module that allows you to easily interact with the Guilded API.

42 lines 1.67 kB
import { APIChannelEditPayload, APIChannelPayload } from 'guilded-api-typings'; import { BaseManager, FetchOptions } from '../BaseManager'; import { Client } from '../../structures/Client'; import { Channel } from '../../structures/channel/Channel'; /** * The manager of channels that belong to the client. * @example new ChannelManager(client); */ export declare class ChannelManager extends BaseManager<string, Channel> { /** @param client The client the channels belong to. */ constructor(client: Client); /** * Fetch a channel from Guilded, or cache. * @param channel The channel to fetch. * @param options The options to fetch the channel with. * @returns The fetched channel. * @example channels.fetch(channel); */ fetch(channel: string | Channel, options?: FetchOptions): Promise<Channel>; /** * Create a channel on Guilded. * @param payload The payload of the channel. * @returns The created channel. * @example channels.create({ name: 'Chat', type: 'chat' }); */ create(payload: APIChannelPayload): Promise<Channel>; /** * Edit a channel on Guilded. * @param channel The channel to edit. * @param payload The payload of the channel. * @returns The edited channel. * @example channels.edit(channel, { name: 'Chat' }); */ edit(channel: string | Channel, payload: APIChannelEditPayload): Promise<Channel>; /** * Delete a channel from Guilded. * @param channel The channel to delete. * @example channels.delete(channel); */ delete(channel: string | Channel): Promise<void>; } //# sourceMappingURL=ChannelManager.d.ts.map