mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 00:03:09 +02:00
fix: allow no activities
This commit is contained in:
parent
296002e04f
commit
bd15bd8145
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user