Compare commits
2 commits
8c642f16f0
...
24cc4eb26d
Author | SHA1 | Date | |
---|---|---|---|
24cc4eb26d | |||
a16263c04e |
1 changed files with 3 additions and 1 deletions
|
@ -1,4 +1,3 @@
|
|||
const fs = require('fs');
|
||||
const parseTime = require('./parseTime');
|
||||
const timeUntil = require('./timeUntil');
|
||||
const sqlite3 = require('sqlite3').verbose();
|
||||
|
@ -11,6 +10,9 @@ module.exports = async function (message, args) {
|
|||
let timeInSeconds;
|
||||
if(Date.parse(args[0]) && parseFloat(args[0]).toString() === args[0]){
|
||||
timeInSeconds = timeUntil(args[0]);
|
||||
if(timeUntil.totalInSeconds < 0){
|
||||
return message.channel.send("The date must not be in the past.");
|
||||
}
|
||||
}else {
|
||||
timeInSeconds = parseTime(args[0], currentUnixTime);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue