mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 03:18:17 +00:00
16 lines
541 B
TypeScript
16 lines
541 B
TypeScript
import { eventHandlers } from "../../bot.ts";
|
|
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
|
import {
|
|
DiscordIntegrationCreateUpdate,
|
|
IntegrationCreateUpdate,
|
|
} from "../../types/integration/integration_create_update.ts";
|
|
import { snakeKeysToCamelCase } from "../../util/utils.ts";
|
|
|
|
export function handleIntegrationUpdate(data: DiscordGatewayPayload) {
|
|
eventHandlers.integrationUpdate?.(
|
|
snakeKeysToCamelCase<IntegrationCreateUpdate>(
|
|
data.d as DiscordIntegrationCreateUpdate,
|
|
),
|
|
);
|
|
}
|