Merge branch 'main' of https://github.com/Xargana/blahaj-srv
This commit is contained in:
commit
aab35b3bdc
|
@ -275,24 +275,39 @@ async function askCody(question) {
|
||||||
}
|
}
|
||||||
throw error;
|
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();
|
await updateCommands();
|
||||||
|
|
||||||
const ownerId = process.env.OWNER_ID;
|
const ownerId = process.env.OWNER_ID;
|
||||||
const owner = await client.users.fetch(ownerId);
|
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) => {
|
client.on("interactionCreate", async (interaction) => {
|
||||||
|
|
Loading…
Reference in a new issue