mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 19:28:17 +00:00
more handlers
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { Bot } from "../../bot.ts";
|
||||
import type { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import type { InviteCreate } from "../../types/invites/invite_create.ts";
|
||||
import { SnakeCasedPropertiesDeep } from "../../types/util.ts";
|
||||
|
||||
export function handleInviteCreate(data: DiscordGatewayPayload) {
|
||||
eventHandlers.inviteCreate?.(data.d as InviteCreate);
|
||||
export function handleInviteCreate(bot: Bot, data: DiscordGatewayPayload) {
|
||||
bot.events.inviteCreate(bot, bot.transformers.invite(bot, data.d as SnakeCasedPropertiesDeep<InviteCreate>));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user