mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 21:40:49 +02:00
choice argument type
This commit is contained in:
@@ -22,12 +22,8 @@ module.exports = class HatCommand extends Command {
|
||||
{
|
||||
key: 'type',
|
||||
prompt: `What type of hat would you like to use? Either ${list(hats, 'or')}.`,
|
||||
type: 'string',
|
||||
validate: type => {
|
||||
if (hats.includes(type.toLowerCase())) return true;
|
||||
return `Invalid type, please enter either ${list(hats, 'or')}.`;
|
||||
},
|
||||
parse: type => type.toLowerCase()
|
||||
type: 'choice',
|
||||
choices: hats
|
||||
},
|
||||
{
|
||||
key: 'user',
|
||||
|
||||
Reference in New Issue
Block a user