Skip to content

Commit ec159f3

Browse files
committed
feat(ready): Update bot status to use version from config.json
1 parent beb4114 commit ec159f3

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

events/core/ready.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { type Client } from 'discord.js';
2+
import config from '../../config.json' with { type: 'json' };
23

34
export const name = 'ready';
45
export const once = true;
@@ -7,6 +8,13 @@ export function execute(client: Client<true>) {
78
console.log(`[LOG : ${new Date().toLocaleDateString()}] Bot connecté en tant que ${client.user?.tag}`);
89
console.log(`[LOG : ${new Date().toLocaleDateString()}] Prêt à servir ${client.guilds.cache.size} serveur(s)`);
910

10-
// Définir le statut du bot
11-
client.user.setActivity('la modération', { type: 3 }); // Type 3 = Watching
11+
// Définir le statut du bot avec la version depuis config.json
12+
// Types d'activité Discord :
13+
// 0 = Playing (Joue à)
14+
// 1 = Streaming (En stream)
15+
// 2 = Listening (Écoute)
16+
// 3 = Watching (Regarde)
17+
// 4 = Custom (Statut personnalisé)
18+
// 5 = Competing (En compétition dans)
19+
client.user.setActivity(config.botversion, { type: 3 }); // Type 3 = Watching
1220
}

0 commit comments

Comments
 (0)