types: add gateway types

This commit is contained in:
ayntee
2021-03-27 12:37:11 +04:00
parent b1512e0334
commit 72b07574f2
16 changed files with 229 additions and 31 deletions
+6 -2
View File
@@ -1,7 +1,11 @@
import { eventHandlers } from "../../bot.ts";
import {
DiscordGatewayPayload,
DiscordWebhooksUpdate,
} from "../../types/gateway.ts";
export function handleWebhooksUpdate(data: DiscordPayload) {
const options = data.d as WebhookUpdatePayload;
export function handleWebhooksUpdate(data: DiscordGatewayPayload) {
const options = data.d as DiscordWebhooksUpdate;
eventHandlers.webhooksUpdate?.(
options.channel_id,
options.guild_id,