UNPKG

guilded.ts

Version:

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

33 lines 1.22 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CalendarChannel = void 0; const CalendarEventManager_1 = require("../../managers/calendarEvent/CalendarEventManager"); const Channel_1 = require("./Channel"); /** * Represents a calendar channel on Guilded. * @example new CalendarChannel(client, rawChannel); */ class CalendarChannel extends Channel_1.Channel { /** The manager of events that belong to the calendar channel. */ events; /** * @param client The client the calendar channel belongs to. * @param raw The raw data of the calendar channel. * @param cache Whether to cache the calendar channel. */ constructor(client, raw, cache) { super(client, raw, cache); this.events = new CalendarEventManager_1.CalendarEventManager(this); } /** * Creates a event in the calendar channel. * @param payload The payload of the calendar event. * @returns The created calendar event. * @example channel.createEvent({ name: 'Event!' }); */ createEvent(payload) { return this.events.create(payload); } } exports.CalendarChannel = CalendarChannel; //# sourceMappingURL=CalendarChannel.js.map