discord_bot/server/ready.js
SileNce5k e06c6640b7
All checks were successful
CI / CI (push) Successful in 1m24s
Use setInterval on updatePresence instead of setTimeout
2025-06-01 11:18:24 +02:00

20 lines
590 B
JavaScript

const loadServerPrefixes = require('../util/loadServerPrefixes');
const checkTimer = require('../util/timer/checkTimer');
const updatePresence = require('../util/updatePresence');
module.exports = function(client, enableLoginMessage, loginChannel, loginMessage) {
setInterval(() => {
updatePresence(client)
}, 60 * 1000);
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);
}