Framework Rewrite

This commit is contained in:
Dragon Fire
2021-06-05 12:17:33 -04:00
parent 5c9f237321
commit 7917766ce3
48 changed files with 1101 additions and 294 deletions
+3 -3
View File
@@ -1,14 +1,14 @@
const { ArgumentType } = require('discord.js-commando');
const Argument = require('../framework/ArgumentType');
const sherlock = require('sherlockjs');
module.exports = class SherlockType extends ArgumentType {
module.exports = class SherlockType extends Argument {
constructor(client) {
super(client, 'sherlock');
}
validate(value) {
const time = sherlock.parse(value);
if (!time.startDate) return 'Please provide a valid starting time.';
if (!time.startDate) return false;
return true;
}