Files
xiao/types/sherlock.js
T
2021-06-05 12:17:33 -04:00

19 lines
374 B
JavaScript

const Argument = require('../framework/ArgumentType');
const sherlock = require('sherlockjs');
module.exports = class SherlockType extends Argument {
constructor(client) {
super(client, 'sherlock');
}
validate(value) {
const time = sherlock.parse(value);
if (!time.startDate) return false;
return true;
}
parse(value) {
return sherlock.parse(value);
}
};