guilded.ts
Version:
A powerful NPM module that allows you to easily interact with the Guilded API.
58 lines • 2.71 kB
TypeScript
import { Collection } from '@discordjs/collection';
import { APICalendarEventEditPayload, APICalendarEventPayload, APICalendarEventFetchManyOptions } from 'guilded-api-typings';
import { CalendarEvent } from '../../structures/calendarEvent/CalendarEvent';
import { CalendarChannel } from '../../structures/channel/CalendarChannel';
import { BaseManager, FetchManyOptions, FetchOptions } from '../BaseManager';
/**
* The manager of calendar events that belong to a calendar channel.
* @example new CalendarEventManager(channel);
*/
export declare class CalendarEventManager extends BaseManager<number, CalendarEvent> {
readonly channel: CalendarChannel;
/** @param channel The calendar channel the events belong to. */
constructor(channel: CalendarChannel);
/**
* Fetch a calendar event from the channel, or cache.
* @param calendarEvent The calendar event to fetch.
* @param options The options to fetch the calendar event with.
* @returns The fetched calendar event.
* @example calanderEvents.fetch(calendarEvent);
*/
fetch(calendarEvent: number | CalendarEvent, options?: FetchOptions): Promise<CalendarEvent>;
/**
* Fetch calendar events from the channel.
* @param options The options to fetch calendar events with.
* @returns The fetched calendar events.
* @example calanderEvents.fetch();
*/
fetch(options?: CalendarEventFetchManyOptions): Promise<Collection<number, CalendarEvent>>;
/** @ignore */
private fetchSingle;
/** @ignore */
private fetchMany;
/**
* Create a calendar event in the channel.
* @param payload The payload of the calendar event.
* @returns The created calendar event.
* @example calanderEvents.create({ name: 'Event!' });
*/
create(payload: APICalendarEventPayload): Promise<CalendarEvent>;
/**
* Edit a calendar event in the channel.
* @param calendarEvent The calendar event to edit.
* @param payload The payload of the calendar event.
* @returns The edited calendar event.
* @example calanderEvents.edit(calendarEvent, { name: 'Event!' });
*/
edit(calendarEvent: number | CalendarEvent, payload: APICalendarEventEditPayload): Promise<CalendarEvent>;
/**
* Delete a calendar event from the channel.
* @param calendarEvent The calendar event to delete.
* @example calanderEvents.delete(calendarEvent);
*/
delete(calendarEvent: number | CalendarEvent): Promise<void>;
}
/** The options for fetching calendar events. */
export interface CalendarEventFetchManyOptions extends FetchManyOptions, APICalendarEventFetchManyOptions {
}
//# sourceMappingURL=CalendarEventManager.d.ts.map