fix: allow no activities

This commit is contained in:
Isaac 2023-12-06 21:53:44 +00:00
parent 296002e04f
commit bd15bd8145
No known key found for this signature in database
GPG Key ID: 0DE40AE37BBA5C33

View File

@ -53,6 +53,7 @@ module.exports = class extends Listener {
await client.application.commands.fetch(); await client.application.commands.fetch();
// presence/activity // presence/activity
if (client.config.presence.activities?.length > 0) {
let next = 0; let next = 0;
const setPresence = async () => { const setPresence = async () => {
const cacheKey = 'cache/presence'; const cacheKey = 'cache/presence';
@ -90,6 +91,9 @@ module.exports = class extends Listener {
}; };
setPresence(); setPresence();
if (client.config.presence.activities.length > 1) setInterval(() => setPresence(), client.config.presence.interval * 1000); if (client.config.presence.activities.length > 1) setInterval(() => setPresence(), client.config.presence.interval * 1000);
} else {
client.log.info('Presence activities are disabled');
}
// stats posting // stats posting
if (client.config.stats) { if (client.config.stats) {