harmony/src/gateway/handlers/interactionCreate.ts

12 lines
413 B
TypeScript
Raw Normal View History

2020-12-10 04:36:36 +00:00
import { Interaction } from '../../structures/slash.ts'
import { InteractionPayload } from '../../types/slash.ts'
import { Gateway, GatewayEventHandler } from '../index.ts'
export const interactionCreate: GatewayEventHandler = async (
gateway: Gateway,
d: InteractionPayload
) => {
const interaction = new Interaction(gateway.client, d)
gateway.client.emit('interactionCreate', interaction)
}