diff --git a/src/events/client/ready.js b/src/events/client/ready.js index 092aa56..0ea62f6 100644 --- a/src/events/client/ready.js +++ b/src/events/client/ready.js @@ -1,38 +1,20 @@ module.exports = { - name: "ready", - once: true, - async execute(client, Discord) { + name: "ready", + once: true, + async execute(client, Discord) { try { - // Login Message - console.log(`Logged in as: ${client.user.tag.endsWith("#0") ? client.user.username : client.user.tag}`); + // Login Message + console.log(`Logged in as: ${client.user.tag.endsWith("#0") ? client.user.username : client.user.tag}`); - const logsChannel = client.channels.cache.get(client.config_channels.logs); + // Register Commands + const register = require("../../scripts/client-register"); + await register(client); - const online = new Discord.EmbedBuilder() - .setColor(client.config_embeds.green) - .setAuthor({ name: client.user.tag.endsWith("#0") ? client.user.username : client.user.tag, iconURL: client.user.displayAvatarURL({ format: "png", dynamic: true }), url: `https://discord.com/users/${client.user.id}` }) - .setTitle("🟢 Bot is Online") - .setTimestamp() - - logsChannel.send({ embeds: [online] }); - - // Register Commands - const register = require("../../scripts/client-register"); - await register(client); - - const registered = new Discord.EmbedBuilder() - .setColor(client.config_embeds.green) - .setAuthor({ name: client.user.tag.endsWith("#0") ? client.user.username : client.user.tag, iconURL: client.user.displayAvatarURL({ format: "png", dynamic: true }), url: `https://discord.com/users/${client.user.id}` }) - .setTitle("📝 Registered Commands") - .setTimestamp() - - logsChannel.send({ embeds: [registered] }); - - // Cleanup Database - const clean = require("../../util/database/clean"); - await clean(client, Discord); - } catch(err) { - client.logEventError(err); - } - } -} \ No newline at end of file + // Cleanup Database + const cleanDB = require("../../util/database/clean"); + await cleanDB(client, Discord); + } catch(err) { + client.logEventError(err); + } + } +}