UNPKG

sheweny

Version:

The powerful framework for create discord bots

43 lines (42 loc) 1.46 kB
import { BaseManager } from './index.js'; import { Event } from '../structures/index.js'; import { Collection } from 'discord.js'; import type { ShewenyClient } from '../client/Client.js'; import type { EventsManagerOptions, EventsManagerDefaultOptions } from '../typescript/index.js'; /** * Manager for Events */ export declare class EventsManager extends BaseManager { /** * Default data for the events * @type {EventsManagerDefaultOptions} */ default: EventsManagerDefaultOptions; /** * Collection of the events * @type {Collection<string, Event[]> | undefined} */ events?: Collection<string, Event[]>; /** * Constructor to manage events * @param {ShewenyClient} [client] Client framework * @param {EventsManagerOptions} [options] The options of the event manager */ constructor(client: ShewenyClient, options: EventsManagerOptions); /** * Load all events in collection * @returns {Promise<Collection<string, Event[]> | undefined>} The events to load */ loadAll(): Promise<Collection<string, Event[]> | undefined>; /** * Emit all events in collection * @param {Collection<string, Event[]> | undefined} [events] Events collection that will be emit * @returns {Promise<void>} */ registerAll(events: Collection<string, Event[]>): Promise<void>; /** * Unload all events * @returns {void} */ unloadAll(): void; }