Adding status messages on rotation
This commit is contained in:
+16
-1
@@ -4,4 +4,19 @@ const chalk = require('chalk');
|
||||
|
||||
client.on('ready', () => {
|
||||
console.log(chalk.green(`Logged in as ${client.user.tag}!`));
|
||||
});
|
||||
setInterval(() => {
|
||||
let activities = [
|
||||
{ type: "Playing", name: "/verify" },
|
||||
{ type: "Playing", name: "Securing our servers" },
|
||||
{ type: "Watching", name: `Watching bans...` },
|
||||
];
|
||||
|
||||
const status = activities[Math.floor(Math.random() * activities.length)];
|
||||
|
||||
if (status.type === "Watching") {
|
||||
client.user.setPresence({ activities: [{ name: `${status.name}`, type: ActivityType.Watching }] });
|
||||
} else {
|
||||
client.user.setPresence({ activities: [{ name: `${status.name}`, type: ActivityType.Playing }] });
|
||||
}
|
||||
}, 300000); // update every 5 mins
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user