UNPKG

dressed

Version:

A sleek, serverless-ready Discord bot framework.

24 lines 801 B
import ora from "ora"; import { ApplicationWebhookEventType } from "discord-api-types/v10"; import { createHandlerParser } from "./index.js"; export const parseEvents = createHandlerParser({ col1Name: "Event", messages: { pending: "Generating events", generated: "Generated events", noItems: "No events found", }, uniqueKeys: ["type"], itemMessages: ({ name }) => ({ confict: `"${name}" conflicts with another event, skipping the duplicate`, }), async createData({ name }) { const type = ApplicationWebhookEventType[name]; if (!type) { ora(`Event type of "${name}" could not be determined, skipping`).warn(); throw null; } return { type }; }, }); //# sourceMappingURL=events.js.map