first commit
This commit is contained in:
10
events/ready/ready.js
Normal file
10
events/ready/ready.js
Normal file
@ -0,0 +1,10 @@
|
||||
const { Events, PresenceUpdateStatus } = require('discord.js')
|
||||
|
||||
module.exports = {
|
||||
name: Events.ClientReady,
|
||||
once: true,
|
||||
execute(client) {
|
||||
console.log(`Ready! Logged in as ${client.user.tag}`);
|
||||
client.user.setStatus(PresenceUpdateStatus.Online)
|
||||
},
|
||||
};
|
||||
41
events/ready/setActivity.js
Normal file
41
events/ready/setActivity.js
Normal file
@ -0,0 +1,41 @@
|
||||
const { Client, Guild, Events, ActivityType, PresenceUpdateStatus } = require('discord.js');
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Client} client
|
||||
* @param {Guild} guild
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
name: Events.ClientReady,
|
||||
async execute(client) {
|
||||
const guildsCount = client.guilds.cache.size;
|
||||
|
||||
let status = [
|
||||
{
|
||||
name: "I am Live",
|
||||
type: ActivityType.Watching,
|
||||
},
|
||||
{
|
||||
name: "Choo Choo 🚂",
|
||||
},
|
||||
{
|
||||
name: 'Hippity Hoppity',
|
||||
},
|
||||
{
|
||||
name: `I am in ${guildsCount} Server(s)`,
|
||||
},
|
||||
{
|
||||
name: 'Yippe 🐻'
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
setInterval(() => {
|
||||
let random = Math.floor(Math.random() * status.length);
|
||||
client.user.setActivity(status[random]);
|
||||
}, 30000);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user