Réécriture complète 4.0
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 6m16s
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 6m16s
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
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 !`)
|
||||
}
|
||||
}
|
||||
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 })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user