2020-04-06 09:36:32 +00:00
|
|
|
const moment = require('moment')
|
2020-03-30 08:46:36 +00:00
|
|
|
module.exports = (client) => {
|
2020-04-06 09:36:32 +00:00
|
|
|
const timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
|
2020-04-04 09:16:05 +00:00
|
|
|
const activities = client.commands.keyArray()
|
|
|
|
let activity = activities.random()
|
|
|
|
|
2020-04-06 05:54:45 +00:00
|
|
|
client.user.setActivity(`${client.config.defaultPrefix + activity} | v${client.version.number}`, { type: 'PLAYING' })
|
2020-04-04 09:16:05 +00:00
|
|
|
|
|
|
|
setInterval(() => {
|
|
|
|
activity = activities.random()
|
|
|
|
if (client.lockActivity === false) {
|
2020-04-06 05:54:45 +00:00
|
|
|
client.user.setActivity(`${client.config.defaultPrefix + activity} | v${client.version.number}`, { type: 'PLAYING' })
|
2020-04-04 09:16:05 +00:00
|
|
|
};
|
2020-04-06 09:36:32 +00:00
|
|
|
}, 20000)
|
|
|
|
|
|
|
|
// REMOVE ! IN FRONT OF CLIENT.CONFIG.SUPPORT.ID WHEN DEVMODE WORKS
|
|
|
|
|
|
|
|
if (!client.config.support.id && client.config.support.startupLogs && client.devmode === false) {
|
|
|
|
try {
|
|
|
|
const guild = client.guilds.cache.get(client.config.support.id)
|
|
|
|
const channel = guild.channels.cache.get(client.config.support.startupLogs)
|
|
|
|
channel.send(`Bot started at \`${timestamp}\``)
|
|
|
|
} catch (err) {}
|
|
|
|
}
|
2020-04-04 09:16:05 +00:00
|
|
|
|
2020-03-31 07:59:09 +00:00
|
|
|
client.logger.ready('Connected to Discord as ' + client.user.tag)
|
2020-03-30 16:01:13 +00:00
|
|
|
}
|