discord_bot/server/ready.js
SileNce5k c100528c2a
All checks were successful
CI / CI (push) Successful in 1m24s
Use setInterval
2025-06-25 05:08:43 +02:00

20 lines
682 B
JavaScript

const loadServerPrefixes = require('../util/loadServerPrefixes');
const checkTimer = require('../util/timer/checkTimer');
const updatePresence = require('../util/updatePresence');
const updateCpuPercentage = require('../util/updateCpuPercentage')
module.exports = function(client, enableLoginMessage, loginChannel, loginMessage) {
updatePresence(client)
console.log('Ready!');
if (enableLoginMessage === true)
try{
client.channels.cache.get(loginChannel).send(loginMessage)
}catch(err){
console.log("Failed trying to send a message on login.\n")
}
loadServerPrefixes(client)
checkTimer(client);
setInterval(() => {
updateCpuPercentage(client)
}, 60 * 1000);
}