mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 03:18:17 +00:00
19 lines
450 B
TypeScript
19 lines
450 B
TypeScript
import { eventHandlers } from "../../bot.ts";
|
|
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
|
|
|
export function handleApplicationCommandCreate(
|
|
data: DiscordGatewayPayload,
|
|
) {
|
|
const {
|
|
guild_id: guildId,
|
|
application_id: applicationId,
|
|
...rest
|
|
} = data.d as DiscordApplicationCommandCreateUpdateDelete;
|
|
|
|
eventHandlers.applicationCommandCreate?.({
|
|
...rest,
|
|
guildId,
|
|
applicationId,
|
|
});
|
|
}
|