-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathready.js
More file actions
27 lines (23 loc) · 799 Bytes
/
Copy pathready.js
File metadata and controls
27 lines (23 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// events/ready.js
// Fires once when the bot has successfully logged in and cached initial data.
import { Events, ActivityType } from 'discord.js';
export const name = Events.ClientReady;
export const once = true; // Only needs to run once per process lifetime
/**
* @param {import('discord.js').Client} client
*/
export async function execute(client) {
console.log(`\n✅ Logged in as ${client.user.tag}`);
console.log(`📡 Watching ${client.guilds.cache.size} guild(s)`);
console.log(`🔧 ${client.commands.size} slash command(s) loaded\n`);
// Set a status so the bot looks alive in the member list
client.user.setPresence({
activities: [
{
name: 'for new members 👋',
type: ActivityType.Watching,
},
],
status: 'online',
});
}