fix: get rid of type errors for now (#2113)

This commit is contained in:
Yuzu
2022-03-18 04:19:55 +00:00
committed by GitHub
parent 44f02d0c65
commit 33bafd1f6c
10 changed files with 37 additions and 28 deletions
+2 -1
View File
@@ -1,7 +1,8 @@
import type { Bot } from "../../bot.ts";
import type { Guild } from "../../transformers/guild.ts";
import { DiscordGatewayPayload, DiscordGuild } from "../../types/discord.ts";
export function handleGuildCreate(bot: Bot, data: DiscordGatewayPayload, shardId: number) {
const payload = data.d as DiscordGuild;
bot.events.guildCreate(bot, bot.transformers.guild(bot, { guild: payload, shardId }));
bot.events.guildCreate(bot, bot.transformers.guild(bot, { guild: payload, shardId }) as Guild);
}