From ad5628a6cd612db8dd0de9776efbcfa0be412d01 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 10 Apr 2021 18:41:20 -0400 Subject: [PATCH] Add message if time is below 0 in remind --- commands/remind/remind.js | 1 + 1 file changed, 1 insertion(+) diff --git a/commands/remind/remind.js b/commands/remind/remind.js index 9267d7fe..6d12bd8b 100644 --- a/commands/remind/remind.js +++ b/commands/remind/remind.js @@ -25,6 +25,7 @@ module.exports = class RemindCommand extends Command { if (exists) return msg.reply('🕰️ Only one reminder can be set per channel per user.'); const timeMs = time.startDate.getTime() - Date.now(); if (timeMs > 0x7FFFFFFF) return msg.reply('🕰️ Reminders have a maximum length of ~24.84 days.'); + if (timeMs < 0) return msg.reply('🕰️ What do you expect me to do, time travel?'); const display = moment().add(timeMs, 'ms').fromNow(); const title = time.eventTitle ? shorten(time.eventTitle, 500) : 'something'; await this.client.timers.setTimer(msg.channel.id, timeMs, msg.author.id, title);