mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-08 23:32:12 +02:00
Random support in pokemon-fusion
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const pokemon = require('../../assets/json/pokemon-fusion');
|
||||
const { firstUpperCase } = require('../../util/Util');
|
||||
const pokeKeys = Object.keys(pokemon);
|
||||
|
||||
module.exports = class PokemonFusionCommand extends Command {
|
||||
constructor(client) {
|
||||
@@ -16,6 +17,7 @@ module.exports = class PokemonFusionCommand extends Command {
|
||||
key: 'body',
|
||||
prompt: 'What Pokémon should be fused as the body?',
|
||||
type: 'string',
|
||||
default: () => pokeKeys[Math.floor(Math.random() * pokeKeys.length)],
|
||||
validate: body => {
|
||||
if (pokemon[body.toLowerCase()]) return true;
|
||||
return 'Invalid body, only Pokémon from Generation I may be used.';
|
||||
@@ -26,6 +28,7 @@ module.exports = class PokemonFusionCommand extends Command {
|
||||
key: 'palette',
|
||||
prompt: 'What Pokémon should be fused as the palette?',
|
||||
type: 'string',
|
||||
default: () => pokeKeys[Math.floor(Math.random() * pokeKeys.length)],
|
||||
validate: palette => {
|
||||
if (pokemon[palette.toLowerCase()]) return true;
|
||||
return 'Invalid palette, only Pokémon from Generation I may be used.';
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "95.1.9",
|
||||
"version": "95.1.10",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user