thaldrin/DiscordEvents/ready.js

69 lines
1.4 KiB
JavaScript
Executable File

const {
log
} = require('../utils');
const config = require('../config');
const blapi = require('blapi');
//blapi.setLogging(true);
function randomStatus(client) {
const States = [{
activity: {
name: 'server fans whirr 💨',
type: 'LISTENING'
},
status: 'online'
},
{
activity: {
name: "my master's keyboard -w-",
type: 'LISTENING'
},
status: 'online'
},
{
activity: {
name: client.guilds.size + ' Servers -w-',
type: 'WATCHING'
},
status: 'online'
},
// { game: { name: `${client.users.get('318044130796109825').username} dance~`, type: 'WATCHING' }, status: 'dnd' },
// { game: { name: thal.users.size + ' Wolves', type: 'WATCHING' }, status: 'dnd' },
{
activity: {
name: 'Δ & ♫',
type: 'LISTENING'
},
status: 'online'
},
{
activity: {
name: 'True Damage - GIANTS',
type: 'LISTENING'
},
status: 'online'
},
{
activity: {
name: `'help | thaldr.in`,
type: 'WATCHING'
},
status: 'online'
}
// { game: { name: `over ${thal.users.get('318044130796109825').username}~`, type: 'WATCHING' }, status: 'dnd' }
];
let status = States[~~(Math.random() * States.length)];
return client.user.setPresence(status);
}
module.exports = {
name: 'ready',
run: async (client) => {
blapi.handle(client, config.apis);
log.hasStarted();
randomStatus(client);
setInterval(() => {
randomStatus(client);
}, 60000);
}
};