Revert "choice argument type"

This reverts commit 679bb538cb.
This commit is contained in:
Daniel Odendahl Jr
2018-03-17 13:22:07 +00:00
parent 12e8af1e92
commit d74e2c9d96
17 changed files with 121 additions and 84 deletions
-19
View File
@@ -1,19 +0,0 @@
const { ArgumentType } = require('discord.js-commando');
const { list } = require('../util/Util');
class ChoiceArgumentType extends ArgumentType {
constructor(client) {
super(client, 'choice');
}
validate(value, msg, arg) {
if (arg.choices.includes(value.toLowerCase())) return true;
return `Invalid ${arg.label}, please enter either ${list(arg.choices, 'or')}.`;
}
parse(value) {
return value.toLowerCase();
}
}
module.exports = ChoiceArgumentType;