guilded.ts
Version:
A powerful NPM module that allows you to easily interact with the Guilded API.
34 lines • 1.12 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DocChannel = void 0;
const Channel_1 = require("./Channel");
const DocManager_1 = require("../../managers/DocManager");
/**
* Represents a doc channel on Guilded.
* @example new DocChannel(client, rawChannel);
*/
class DocChannel extends Channel_1.Channel {
/** The manager of docs that belong to the doc channel. */
docs;
/**
* @param client The client the doc channel belongs to.
* @param raw The raw data of the doc channel.
* @param cache Whether to cache the doc channel.
*/
constructor(client, raw, cache) {
super(client, raw, cache);
this.docs = new DocManager_1.DocManager(this);
}
/**
* Create a doc in the doc channel.
* @param title The title of the doc.
* @param content The content of the doc.
* @returns The created doc.
* @example channel.createDoc('Title', 'Content');
*/
post(title, content) {
return this.docs.create(title, content);
}
}
exports.DocChannel = DocChannel;
//# sourceMappingURL=DocChannel.js.map