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)