Files
discordeno/handlers/integrations/INTEGRATION_CREATE.ts
T
2022-02-11 09:49:53 +00:00

12 lines
514 B
TypeScript

import { Bot } from "../../bot.ts";
import type { DiscordGatewayPayload } from "../../types/gateway/gatewayPayload.ts";
import type { IntegrationCreateUpdate } from "../../types/integrations/integrationCreateUpdate.ts";
import { SnakeCasedPropertiesDeep } from "../../types/util.ts";
export function handleIntegrationCreate(bot: Bot, data: DiscordGatewayPayload) {
bot.events.integrationCreate(
bot,
bot.transformers.integration(bot, data.d as SnakeCasedPropertiesDeep<IntegrationCreateUpdate>),
);
}