mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 18:05:01 +02:00
Cleaner Looking args
This commit is contained in:
@@ -9,11 +9,13 @@ module.exports = class BotSearchCommand extends Command {
|
||||
group: 'search',
|
||||
memberName: 'botinfo',
|
||||
description: 'Searches Discord Bots for info on a bot.',
|
||||
args: [{
|
||||
key: 'bot',
|
||||
prompt: 'Which bot do you want to get information for?',
|
||||
type: 'user'
|
||||
}]
|
||||
args: [
|
||||
{
|
||||
key: 'bot',
|
||||
prompt: 'Which bot do you want to get information for?',
|
||||
type: 'user'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -9,12 +9,14 @@ module.exports = class DefineCommand extends Command {
|
||||
group: 'search',
|
||||
memberName: 'define',
|
||||
description: 'Defines a word.',
|
||||
args: [{
|
||||
key: 'query',
|
||||
prompt: 'What would you like to define?',
|
||||
type: 'string',
|
||||
parse: query => encodeURIComponent(query)
|
||||
}]
|
||||
args: [
|
||||
{
|
||||
key: 'query',
|
||||
prompt: 'What would you like to define?',
|
||||
type: 'string',
|
||||
parse: query => encodeURIComponent(query)
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -12,16 +12,18 @@ module.exports = class DiscrimCommand extends Command {
|
||||
group: 'search',
|
||||
memberName: 'discrim',
|
||||
description: 'Searches for other users with a certain discriminator.',
|
||||
args: [{
|
||||
key: 'discrim',
|
||||
prompt: 'Which discriminator would you like to search for?',
|
||||
type: 'string',
|
||||
validate: discrim => {
|
||||
if (/[0-9]+$/g.test(discrim) && discrim.length === 4)
|
||||
return true;
|
||||
return `${discrim} is not a valid discriminator.`;
|
||||
args: [
|
||||
{
|
||||
key: 'discrim',
|
||||
prompt: 'Which discriminator would you like to search for?',
|
||||
type: 'string',
|
||||
validate: discrim => {
|
||||
if (/[0-9]+$/g.test(discrim) && discrim.length === 4)
|
||||
return true;
|
||||
return `${discrim} is not a valid discriminator.`;
|
||||
}
|
||||
}
|
||||
}]
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -9,11 +9,13 @@ module.exports = class ForecastCommand extends Command {
|
||||
group: 'search',
|
||||
memberName: 'forecast',
|
||||
description: 'Gets the seven-day forecast for a specified location.',
|
||||
args: [{
|
||||
key: 'query',
|
||||
prompt: 'What location would you like to get the forecast for?',
|
||||
type: 'string'
|
||||
}]
|
||||
args: [
|
||||
{
|
||||
key: 'query',
|
||||
prompt: 'What location would you like to get the forecast for?',
|
||||
type: 'string'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -10,12 +10,14 @@ module.exports = class GoogleCommand extends Command {
|
||||
group: 'search',
|
||||
memberName: 'google',
|
||||
description: 'Searches Google.',
|
||||
args: [{
|
||||
key: 'query',
|
||||
prompt: 'What would you like to search for?',
|
||||
type: 'string',
|
||||
parse: query => encodeURIComponent(query)
|
||||
}]
|
||||
args: [
|
||||
{
|
||||
key: 'query',
|
||||
prompt: 'What would you like to search for?',
|
||||
type: 'string',
|
||||
parse: query => encodeURIComponent(query)
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -9,12 +9,14 @@ module.exports = class IMDBCommand extends Command {
|
||||
group: 'search',
|
||||
memberName: 'imdb',
|
||||
description: 'Searches IMDB for a specified movie.',
|
||||
args: [{
|
||||
key: 'query',
|
||||
prompt: 'What movie or TV Show would you like to search for?',
|
||||
type: 'string',
|
||||
parse: query => encodeURIComponent(query)
|
||||
}]
|
||||
args: [
|
||||
{
|
||||
key: 'query',
|
||||
prompt: 'What movie or TV Show would you like to search for?',
|
||||
type: 'string',
|
||||
parse: query => encodeURIComponent(query)
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -7,12 +7,14 @@ module.exports = class LMGTFYCommand extends Command {
|
||||
group: 'search',
|
||||
memberName: 'lmgtfy',
|
||||
description: 'Responds with a LMGTFY link.',
|
||||
args: [{
|
||||
key: 'query',
|
||||
prompt: 'What would you like to the link to search for?',
|
||||
type: 'string',
|
||||
parse: query => encodeURIComponent(query)
|
||||
}]
|
||||
args: [
|
||||
{
|
||||
key: 'query',
|
||||
prompt: 'What would you like to the link to search for?',
|
||||
type: 'string',
|
||||
parse: query => encodeURIComponent(query)
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+18
-14
@@ -8,21 +8,25 @@ module.exports = class MapCommand extends Command {
|
||||
group: 'search',
|
||||
memberName: 'map',
|
||||
description: 'Gets a map image for the location you define with the zoom level you define (1-20).',
|
||||
args: [{
|
||||
key: 'zoom',
|
||||
prompt: 'What would you like the zoom level for the map to be? Limit 1-20.',
|
||||
type: 'integer',
|
||||
validate: zoom => {
|
||||
if (zoom < 21 && zoom > 0)
|
||||
return true;
|
||||
return 'Please enter a zoom value from 1-20';
|
||||
args: [
|
||||
{
|
||||
key: 'zoom',
|
||||
label: 'zoom level',
|
||||
prompt: 'What would you like the zoom level for the map to be? Limit 1-20.',
|
||||
type: 'integer',
|
||||
validate: zoom => {
|
||||
if (zoom < 21 && zoom > 0)
|
||||
return true;
|
||||
return 'Please enter a zoom value from 1-20';
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'query',
|
||||
prompt: 'What location you like to get a map image for?',
|
||||
type: 'string',
|
||||
parse: query => encodeURIComponent(query)
|
||||
}
|
||||
}, {
|
||||
key: 'query',
|
||||
prompt: 'What location you like to get a map image for?',
|
||||
type: 'string',
|
||||
parse: query => encodeURIComponent(query)
|
||||
}]
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -9,12 +9,14 @@ module.exports = class NeopetCommand extends Command {
|
||||
group: 'search',
|
||||
memberName: 'neopet',
|
||||
description: 'Gives a Neopet\'s image, searchable by name.',
|
||||
args: [{
|
||||
key: 'query',
|
||||
prompt: 'What pet would you like to get the image of?',
|
||||
type: 'string',
|
||||
parse: query => encodeURIComponent(query)
|
||||
}]
|
||||
args: [
|
||||
{
|
||||
key: 'query',
|
||||
prompt: 'What pet would you like to get the image of?',
|
||||
type: 'string',
|
||||
parse: query => encodeURIComponent(query)
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -9,12 +9,14 @@ module.exports = class OsuCommand extends Command {
|
||||
group: 'search',
|
||||
memberName: 'osu',
|
||||
description: 'Searches Osu! user data.',
|
||||
args: [{
|
||||
key: 'query',
|
||||
prompt: 'What osu username would you like to search for?',
|
||||
type: 'string',
|
||||
parse: query => encodeURIComponent(query)
|
||||
}]
|
||||
args: [
|
||||
{
|
||||
key: 'query',
|
||||
prompt: 'What osu username would you like to search for?',
|
||||
type: 'string',
|
||||
parse: query => encodeURIComponent(query)
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -9,12 +9,14 @@ module.exports = class SoundCloudCommand extends Command {
|
||||
group: 'search',
|
||||
memberName: 'soundcloud',
|
||||
description: 'Searches SoundCloud for a song.',
|
||||
args: [{
|
||||
key: 'query',
|
||||
prompt: 'What do you want to search SoundCloud for?',
|
||||
type: 'string',
|
||||
parse: text => encodeURIComponent(text)
|
||||
}]
|
||||
args: [
|
||||
{
|
||||
key: 'query',
|
||||
prompt: 'What do you want to search SoundCloud for?',
|
||||
type: 'string',
|
||||
parse: text => encodeURIComponent(text)
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -9,12 +9,14 @@ module.exports = class UrbanCommand extends Command {
|
||||
group: 'search',
|
||||
memberName: 'urban',
|
||||
description: 'Searches Urban Dictionary for a word.',
|
||||
args: [{
|
||||
key: 'query',
|
||||
prompt: 'What would you like to define?',
|
||||
type: 'string',
|
||||
parse: text => encodeURIComponent(text)
|
||||
}]
|
||||
args: [
|
||||
{
|
||||
key: 'query',
|
||||
prompt: 'What would you like to define?',
|
||||
type: 'string',
|
||||
parse: text => encodeURIComponent(text)
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -9,12 +9,14 @@ module.exports = class WattpadCommand extends Command {
|
||||
group: 'search',
|
||||
memberName: 'wattpad',
|
||||
description: 'Searches Wattpad for a book.',
|
||||
args: [{
|
||||
key: 'query',
|
||||
prompt: 'What book would you like to search for?',
|
||||
type: 'string',
|
||||
parse: text => encodeURIComponent(text)
|
||||
}]
|
||||
args: [
|
||||
{
|
||||
key: 'query',
|
||||
prompt: 'What book would you like to search for?',
|
||||
type: 'string',
|
||||
parse: text => encodeURIComponent(text)
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -9,11 +9,13 @@ module.exports = class WeatherCommand extends Command {
|
||||
group: 'search',
|
||||
memberName: 'weather',
|
||||
description: 'Gets weather information for a specified location.',
|
||||
args: [{
|
||||
key: 'query',
|
||||
prompt: 'What location would you like to get the current weather for?',
|
||||
type: 'string'
|
||||
}]
|
||||
args: [
|
||||
{
|
||||
key: 'query',
|
||||
prompt: 'What location would you like to get the current weather for?',
|
||||
type: 'string'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -9,12 +9,14 @@ module.exports = class WikipediaCommand extends Command {
|
||||
group: 'search',
|
||||
memberName: 'wikipedia',
|
||||
description: 'Searches Wikipedia for something.',
|
||||
args: [{
|
||||
key: 'query',
|
||||
prompt: 'What would you like to search for?',
|
||||
type: 'string',
|
||||
parse: text => encodeURIComponent(text)
|
||||
}]
|
||||
args: [
|
||||
{
|
||||
key: 'query',
|
||||
prompt: 'What would you like to search for?',
|
||||
type: 'string',
|
||||
parse: text => encodeURIComponent(text)
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -9,12 +9,14 @@ module.exports = class YouTubeCommand extends Command {
|
||||
group: 'search',
|
||||
memberName: 'youtube',
|
||||
description: 'Searches YouTube for a video.',
|
||||
args: [{
|
||||
key: 'query',
|
||||
prompt: 'What would you like to search for?',
|
||||
type: 'string',
|
||||
parse: text => encodeURIComponent(text)
|
||||
}]
|
||||
args: [
|
||||
{
|
||||
key: 'query',
|
||||
prompt: 'What would you like to search for?',
|
||||
type: 'string',
|
||||
parse: text => encodeURIComponent(text)
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -9,12 +9,14 @@ module.exports = class YuGiOhCommand extends Command {
|
||||
group: 'search',
|
||||
memberName: 'yugioh',
|
||||
description: 'Gets info on a Yu-Gi-Oh! Card.',
|
||||
args: [{
|
||||
key: 'query',
|
||||
prompt: 'What card would you like to get data for?',
|
||||
type: 'string',
|
||||
parse: text => encodeURIComponent(text)
|
||||
}]
|
||||
args: [
|
||||
{
|
||||
key: 'query',
|
||||
prompt: 'What card would you like to get data for?',
|
||||
type: 'string',
|
||||
parse: text => encodeURIComponent(text)
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user