Fixed bug when updating relay settings

This commit is contained in:
Skylar Grant 2023-07-31 15:12:23 -04:00
parent 94c3244016
commit ae602d08de

View File

@ -149,7 +149,7 @@ module.exports = {
const outWaterMessage = inWaterMessage ? inWaterMessage : guildInfo.waterMessage; const outWaterMessage = inWaterMessage ? inWaterMessage : guildInfo.waterMessage;
const outFruitMessage = inFruitMessage ? inFruitMessage : guildInfo.fruitMessage; const outFruitMessage = inFruitMessage ? inFruitMessage : guildInfo.fruitMessage;
const outReminderChannelId = inReminderChannel ? inReminderChannel.id : guildInfo.reminderChannelId; const outReminderChannelId = inReminderChannel ? inReminderChannel.id : guildInfo.reminderChannelId;
const outEnabled = inEnabled === undefined ? guildInfo.notificationsEnabled : inEnabled; const outEnabled = inEnabled ? inEnabled : guildInfo.notificationsEnabled;
// Update the relay configuration // Update the relay configuration
guildInfo.setReminders(outWaterMessage, outFruitMessage, outReminderChannelId, outWatchChannelId, outEnabled); guildInfo.setReminders(outWaterMessage, outFruitMessage, outReminderChannelId, outWatchChannelId, outEnabled);