dressed
Version:
A sleek, serverless-ready Discord bot framework.
16 lines • 661 B
JavaScript
import { ApplicationWebhookEventType } from "discord-api-types/v10";
import { warnSymbol } from "../../../utils/log.js";
import { createHandlerParser } from "./index.js";
export const parseEvents = createHandlerParser({
colNames: ["Event"],
uniqueKeys: ["type"],
itemMessages: ({ name }) => ({ confict: `"${name}" conflicts with another event, skipping the duplicate` }),
createData({ name }) {
const type = ApplicationWebhookEventType[name];
if (!type) {
throw `${warnSymbol} Event type of "${name}" could not be determined, skipping`;
}
return { type };
},
});
//# sourceMappingURL=events.js.map