From 29f1be6f2c963aab6a92ddd6ec34c7a31417c6a1 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Fri, 13 Nov 2020 17:06:31 -0500 Subject: [PATCH] Automaticly use "something" in timer as the title. --- commands/other/timer.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/other/timer.js b/commands/other/timer.js index ae234b4c..f9167c5a 100644 --- a/commands/other/timer.js +++ b/commands/other/timer.js @@ -26,11 +26,12 @@ module.exports = class TimerCommand extends Command { const timeMs = time.startDate.getTime() - Date.now(); if (timeMs > 600000) return msg.reply('Times above 10 minutes are not currently supported. Sorry!'); const display = moment().add(timeMs, 'ms').fromNow(); + const title = time.eventTitle || 'something'; const timeout = setTimeout(async () => { - await msg.channel.send(`🕰️ ${msg.author}, you wanted me to remind you of: **"${time.eventTitle}"**.`); + await msg.channel.send(`🕰️ ${msg.author}, you wanted me to remind you of: **"${title}"**.`); this.timers.delete(msg.channel.id); }, timeMs); this.timers.set(msg.channel.id, timeout); - return msg.say(`🕰️ Okay, I will remind you **"${time.eventTitle}"** ${display}.`); + return msg.say(`🕰️ Okay, I will remind you **"${title}"** ${display}.`); } };