mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 06:42:51 +02:00
oneOf
This commit is contained in:
@@ -17,10 +17,7 @@ module.exports = class EmojiListCommand extends Command {
|
||||
prompt: `What type of emoji would you like to view? Either ${list(types, 'or')}.`,
|
||||
type: 'string',
|
||||
default: 'regular',
|
||||
validate: type => {
|
||||
if (types.includes(type.toLowerCase())) return true;
|
||||
return `Invalid type, please enter either ${list(types, 'or')}.`;
|
||||
},
|
||||
oneOf: types,
|
||||
parse: type => type.toLowerCase()
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user