mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 03:18:17 +00:00
11 lines
436 B
TypeScript
11 lines
436 B
TypeScript
import type { Bot } from "../../bot.ts";
|
|
import type { Guild } from "../../transformers/guild.ts";
|
|
import { DiscordGatewayPayload, DiscordGuild } from "../../types/discord.ts";
|
|
|
|
export function handleGuildLoaded(bot: Bot, data: DiscordGatewayPayload, shardId: number) {
|
|
const payload = data.d as DiscordGuild;
|
|
|
|
const guild = bot.transformers.guild(bot, { guild: payload, shardId });
|
|
bot.events.guildLoaded(bot, guild as Guild);
|
|
}
|