mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-15 19:08:17 +00:00
12 lines
514 B
TypeScript
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 handleIntegrationUpdate(bot: Bot, data: DiscordGatewayPayload) {
|
|
bot.events.integrationUpdate(
|
|
bot,
|
|
bot.transformers.integration(bot, data.d as SnakeCasedPropertiesDeep<IntegrationCreateUpdate>),
|
|
);
|
|
}
|