Files
blitzkit/src/events/ready.ts
T

20 lines
641 B
TypeScript
Raw Normal View History

2023-11-25 20:40:11 -06:00
import { ActivityType, Client } from 'discord.js';
2023-05-19 23:30:50 +00:00
export default function ready(client: Client<true>) {
2023-11-25 20:40:11 -06:00
console.log(`🟢 Launched bot ${client.shard?.ids[0] ?? 'default'}`);
const activities: (() => string)[] = [
() => `Living in ${client.guilds.cache.size.toLocaleString()} servers`,
2023-11-25 20:45:00 -06:00
() => `Serving ${client.users.cache.size.toLocaleString()} users`,
2023-11-25 20:40:11 -06:00
() => `Observing ${client.channels.cache.size.toLocaleString()} channels`,
];
client.user.setPresence({
activities: [
{
type: ActivityType.Custom,
name: activities[Math.floor(Math.random() * activities.length)](),
},
],
});
2023-05-19 23:30:50 +00:00
}