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.ListChannel = void 0;
const Channel_1 = require("./Channel");
const ListItemManager_1 = require("../../managers/ListItemManager");
/**
* Represents a list channel on Guilded.
* @example new ListChannel(client, rawChannel);
*/
class ListChannel extends Channel_1.Channel {
/** The manager of items that belong to the list channel. */
items;
/**
* @param client The client the list channel belongs to.
* @param raw The raw data of the list channel.
* @param cache Whether to cache the list channel.
*/
constructor(client, raw, cache) {
super(client, raw, cache);
this.items = new ListItemManager_1.ListItemManager(this);
}
/**
* Create a item in the list channel.
* @param message The message of the list item.
* @param note The note of the list item.
* @returns The created list item.
* @example channel.createItem('Hello World!');
*/
addItem(message, note) {
return this.items.add(message, note);
}
}
exports.ListChannel = ListChannel;
//# sourceMappingURL=ListChannel.js.map