From 6be04269877ddd36680a8853f9056956433fb03e Mon Sep 17 00:00:00 2001 From: Xargana Date: Sat, 29 Mar 2025 22:20:27 +0300 Subject: [PATCH] whoops --- discord/index.js | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/discord/index.js b/discord/index.js index a764964..f37ec35 100644 --- a/discord/index.js +++ b/discord/index.js @@ -275,25 +275,40 @@ async function askCody(question) { } throw error; } -}client.once("ready", async () => { - console.log(`Logged in as ${client.user.tag}`); +} +client.once("ready", async () => { + const timestamp = new Date().toISOString(); + console.log(`[${timestamp}] Logged in as ${client.user.tag}`); await updateCommands(); const ownerId = process.env.OWNER_ID; const owner = await client.users.fetch(ownerId); - await owner.send(`Bot started successfully at ${new Date().toLocaleString()}`); + const startupEmbed = { + title: "Bot Status Update", + description: "Bot has started successfully", + color: 0x00ff00, + timestamp: new Date(), + fields: [ + { + name: "Bot Name", + value: client.user.tag, + inline: true + }, + { + name: "Start Time", + value: new Date().toLocaleString(), + inline: true + } + ], + footer: { + text: "blahaj-srv" + } + }; + + await owner.send({ embeds: [startupEmbed] }); }); -client.on("interactionCreate", async (interaction) => { - // Safe channel type logging - console.log(`Interaction received in: ${interaction.channel?.type || 'Unknown channel type'}`); - console.log(`Command name: ${interaction.commandName}`); - console.log(`Channel: ${interaction.channel?.id || 'No channel'}`); - - // Rest of your existing handler code... - }); - - + client.on("interactionCreate", async (interaction) => { // Handle slash commands