mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
fix
This commit is contained in:
@@ -9,9 +9,9 @@ import { snakeKeysToCamelCase } from "../../util/utils.ts";
|
||||
export function handleIntegrationCreate(
|
||||
data: DiscordGatewayPayload,
|
||||
) {
|
||||
const payload = data.d as DiscordIntegrationCreateUpdate;
|
||||
|
||||
eventHandlers.integrationCreate?.(
|
||||
snakeKeysToCamelCase(payload) as IntegrationCreateUpdate,
|
||||
snakeKeysToCamelCase<IntegrationCreateUpdate>(
|
||||
data.d as DiscordIntegrationCreateUpdate,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { IntegrationCreateUpdate } from "../../types/integration/integration_create_update.ts";
|
||||
import {
|
||||
DiscordIntegrationDelete,
|
||||
IntegrationDelete,
|
||||
} from "../../types/integration/integration_delete.ts";
|
||||
import { snakeKeysToCamelCase } from "../../util/utils.ts";
|
||||
|
||||
export function handleIntegrationDelete(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as DiscordIntegrationDelete;
|
||||
|
||||
eventHandlers.integrationDelete?.(
|
||||
snakeKeysToCamelCase(payload) as IntegrationDelete,
|
||||
snakeKeysToCamelCase<IntegrationCreateUpdate>(
|
||||
data.d as DiscordIntegrationDelete,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7,9 +7,9 @@ import {
|
||||
import { snakeKeysToCamelCase } from "../../util/utils.ts";
|
||||
|
||||
export function handleIntegrationUpdate(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as DiscordIntegrationCreateUpdate;
|
||||
|
||||
eventHandlers.integrationUpdate?.(
|
||||
snakeKeysToCamelCase(payload) as IntegrationCreateUpdate,
|
||||
snakeKeysToCamelCase<IntegrationCreateUpdate>(
|
||||
data.d as DiscordIntegrationCreateUpdate,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user