mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-03 23:36:35 +02:00
30 lines
1.1 KiB
JavaScript
30 lines
1.1 KiB
JavaScript
const { Events, ActivityType } = require("discord.js");
|
|
|
|
module.exports = {
|
|
name: Events.ClientReady,
|
|
async run(client) {
|
|
if (client.commands && Array.isArray(client.commands)) {
|
|
client.application.commands.set(
|
|
client.commands.map((command) => command.data)
|
|
);
|
|
} else {
|
|
console.error("Les commandes du client sont manquantes ou mal formatées\n");
|
|
}
|
|
console.log(`
|
|
[${new Date().toLocaleString()}] Logged in as ${client.user.tag} with:
|
|
- ${client.guilds.cache.size} guilds
|
|
- ${client.channels.cache.size} channels
|
|
- ${client.users.cache.size} users
|
|
`);
|
|
|
|
client.user.setActivity({
|
|
name: "&help",
|
|
type: ActivityType.Streaming, //Playing, Streaming, Listening, Watching, Custom, Competing
|
|
url: "https://www.twitch.tv/tuturp33"
|
|
});
|
|
const activityTypes = ['Playing', 'Streaming', 'Listening', 'Watching', 'Custom', 'Competing'];
|
|
let activityType = activityTypes[client.user.presence.activities[0].type] || 'Unknown';
|
|
console.log(`[${new Date().toLocaleString()}] Bot activity set to ${activityType}: ${client.user.presence.activities[0].name}\n`);
|
|
|
|
},
|
|
}; |