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