mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 03:18:17 +00:00
autoconvert handler messages
This commit is contained in:
@@ -1,17 +1,13 @@
|
||||
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 handleIntegrationCreate(
|
||||
data: DiscordGatewayPayload,
|
||||
) {
|
||||
eventHandlers.integrationCreate?.(
|
||||
snakeKeysToCamelCase<IntegrationCreateUpdate>(
|
||||
data.d as DiscordIntegrationCreateUpdate,
|
||||
),
|
||||
data.d as IntegrationCreateUpdate,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user