const { ActivityType } = require('discord.js'); const client = require('..'); const chalk = require('chalk'); client.on('ready', () => { console.log(chalk.green(`Logged in as ${client.user.tag}!`)); setInterval(() => { let activities = [ { type: "Playing", name: "with /verify command." }, { type: "Playing", name: "whilst securing our servers." }, { type: "Watching", name: `for the shooting stars.` }, { type: "Watching", name: `over everyone.` }, { type: "Watching", name: `for the storm that is approaching.` }, { type: "Listening", name: "the sound of silence." }, { type: "Listening", name: "the sound of the rain." }, { type: "Listening", name: "the sound of the wind." } ]; const status = activities[Math.floor(Math.random() * activities.length)]; switch (status.type) { case "Playing": client.user.setPresence({ activities: [{ name: `${status.name}`, type: ActivityType.Playing }] }); break; case "Watching": client.user.setPresence({ activities: [{ name: `${status.name}`, type: ActivityType.Watching }] }); break; case "Listening": client.user.setPresence({ activities: [{ name: `${status.name}`, type: ActivityType.Listening }] }); break; } }, 30000); // update every 5 mins });