From 01f752660b0c1982fa4826237dadd37cabf39e9a Mon Sep 17 00:00:00 2001 From: "Jill \"oatmealine\" Monoids" Date: Wed, 8 Jun 2022 02:33:31 +0300 Subject: [PATCH] add an option to disable daytime announcements --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index e297584..d512889 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ const Discord = require('discord.js'); -const {token} = require('./config.json'); +const { token, disableDaytimeAnnouncements } = require('./config.json'); const fs = require('fs'); const path = require('path'); @@ -88,7 +88,7 @@ bot.on('ready', () => { // console.log(current, next.morning, next.night); - if (current > next.morning) { + if (current > next.morning && !disableDaytimeAnnouncements) { next.morning = getNextMorning(); channels.forEach(c => { bot.channels.fetch(c) @@ -97,7 +97,7 @@ bot.on('ready', () => { }); save(); } - if (current > next.night) { + if (current > next.night && !disableDaytimeAnnouncements) { next.night = getNextNight(); channels.forEach(c => { bot.channels.fetch(c)