import { Events, Guild } from "discord.js"
import dbGuildInit from "@/utils/dbGuildInit"
import { logConsole } from "@/utils/console"

export const name = Events.GuildCreate
export async function execute(guild: Guild) {
	logConsole('discordjs', 'guild_create', { name: guild.name, count: guild.memberCount.toString() })

	const guildProfile = await dbGuildInit(guild)

	logConsole('mongoose', 'guild_create', { name: guildProfile.guildName })
}
