mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-16 15:57:54 +02:00
Framework Rewrite
This commit is contained in:
+3
-3
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user