mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 21:40:49 +02:00
Add examples
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const Argument = require('../framework/ArgumentType');
|
||||
const examples = ['Pikachu', 'Bulbasaur', 'Victini', 'Flygon'];
|
||||
|
||||
module.exports = class PokemonArgument extends Argument {
|
||||
constructor(client) {
|
||||
@@ -14,4 +15,9 @@ module.exports = class PokemonArgument extends Argument {
|
||||
parse(value) {
|
||||
return this.client.pokemon.fetch(value);
|
||||
}
|
||||
|
||||
example() {
|
||||
if (this.client.pokemon.size) return this.client.pokemon.random().name;
|
||||
return examples[Math.floor(Math.random() * examples.length)];
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user