From 9f97e8b7a83ddd9a441a745c256a51614b929d8e Mon Sep 17 00:00:00 2001 From: Pranshu Patel Date: Fri, 17 Feb 2023 12:19:16 +0530 Subject: [PATCH] err --- bot.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bot.js b/bot.js index 91af5b9..ba5ba49 100644 --- a/bot.js +++ b/bot.js @@ -18,7 +18,7 @@ const client = new Client({ 'GUILD_VOICE_STATES', ] }) -const { MessageEmbed } = require('discord.js') +const Discord = require('discord.js') const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js')) const commands = [] client.commands = new Collection() @@ -37,7 +37,7 @@ for(const file of eventFiles){ } } client.on('guildCreate' , guild => { - const guild_embed = new MessageEmbed() + const guild_embed = new Discord.MessageEmbed() .setColor('00FFFF') .setTitle('New Guild!') .setDescription(`Elpha has joined the server ${guild.name}`) @@ -45,7 +45,7 @@ client.on('guildCreate' , guild => { {name: 'Members:', value: `${guild.memberCount}`}, {name: 'Guild ID:', value: `${guild.id}`}, {name: 'Guild owner:', value: `> <@${guild.ownerId}> \`[${guild.ownerId}]\``}, - {name: 'Total servers:', value: `${await client.guilds.cache.size}`}, + {name: 'Total servers:', value: `${client.guilds.cache.size}`}, ) .setThumbnail(guild.iconURL()) .setTimestamp() @@ -53,7 +53,7 @@ client.on('guildCreate' , guild => { }) client.on('guildDelete' , guild => { if(guild.available){ - const embed = new MessageEmbed() + const embed = new Discord.MessageEmbed() .setColor('00FFFF') .setTitle('Guild Left') .setDescription(`Elpha has left the server ${guild.name}`) @@ -61,7 +61,7 @@ client.on('guildDelete' , guild => { {name: 'Members:', value: `${guild.memberCount}`}, {name: 'Guild ID:', value: `${guild.id}`}, {name: 'Guild owner:', value: `> <@${guild.ownerId}> \`[${guild.ownerId}]\``}, - {name: 'Total servers:', value: `${await client.guilds.cache.size}`}, + {name: 'Total servers:', value: `${client.guilds.cache.size}`}, ) .setThumbnail(guild.iconURL()) .setTimestamp()