Intégration MongoDB + Fix export et amp

This commit is contained in:
Angels-dev
2024-02-29 00:24:21 +01:00
parent 397a45e371
commit 94c7fc1c98
63 changed files with 1608 additions and 1161 deletions

View File

@@ -0,0 +1,14 @@
import { Events, Guild } from 'discord.js'
import dbGuildInit from '../../utils/dbGuildInit'
export default {
name: Events.GuildCreate,
async execute(guild: Guild) {
console.log(`Joined ${guild.name} with ${guild.memberCount} members`)
let guildProfile = await dbGuildInit(guild)
if (!guildProfile) return console.log(`An error occured while initializing database data for **${guild.name}** !`)
console.log(`Database data for new guild **${guildProfile.guildName}** successfully initialized !`)
}
}