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