mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Pokemon Cry Command
This commit is contained in:
@@ -268,7 +268,7 @@ in the appropriate channel's topic to use it.
|
||||
|
||||
## Commands
|
||||
|
||||
Total: 560
|
||||
Total: 561
|
||||
|
||||
### Utility:
|
||||
|
||||
@@ -843,6 +843,7 @@ Total: 560
|
||||
|
||||
* **airhorn:** Plays an airhorn sound in a voice channel.
|
||||
* **dec-talk:** The world's best Text-to-Speech.
|
||||
* **pokemon-cry:** Plays a Pokémon's cry.
|
||||
* **soundboard:** Plays a sound in a voice channel.
|
||||
* **vocodes:** Speak text like a variety of famous figures.
|
||||
|
||||
@@ -1528,6 +1529,7 @@ here.
|
||||
* pokemon-fusion (Images)
|
||||
- [PokéAPI](https://pokeapi.co/)
|
||||
* pokedex (API)
|
||||
* pokemon-cry (API)
|
||||
* whos-that-pokemon (API)
|
||||
* whos-that-pokemon-cry (API)
|
||||
- [Pokémon](https://www.pokemon.com/us/)
|
||||
@@ -1535,6 +1537,7 @@ here.
|
||||
* dexter (Image, Original Anime)
|
||||
* hat (Ash Hat Original Anime)
|
||||
* pokedex (Images, Original Game)
|
||||
* pokemon-cry (Original Game)
|
||||
* pokemon-fusion (Original Game)
|
||||
* soundboard (Pikachu Sound)
|
||||
* whos-that-pokemon (Images, Original Game)
|
||||
@@ -1543,6 +1546,7 @@ here.
|
||||
* wynaut (Image, Original Anime)
|
||||
- [Pokémon Showdown](https://play.pokemonshowdown.com/)
|
||||
* pokedex ([Cry Sound Effects (Meltan and Melmetal)](https://play.pokemonshowdown.com/audio/cries/))
|
||||
* pokemon-cry ([Cry Sound Effects (Meltan and Melmetal)](https://play.pokemonshowdown.com/audio/cries/))
|
||||
* whos-that-pokemon ([Cry Sound Effects (Meltan and Melmetal)](https://play.pokemonshowdown.com/audio/cries/))
|
||||
* whos-that-pokemon-cry ([Cry Sound Effects (Meltan and Melmetal)](https://play.pokemonshowdown.com/audio/cries/))
|
||||
- [Pornhub](https://www.pornhub.com/)
|
||||
@@ -1691,6 +1695,8 @@ here.
|
||||
- [The Sounds Resource](https://www.sounds-resource.com/)
|
||||
* pokedex ([Cry Sound Effects (Gen 8)](https://www.sounds-resource.com/nintendo_switch/pokemonswordshield/))
|
||||
* pokedex ([Cry Sound Effects (Gen 1-7)](https://www.sounds-resource.com/3ds/pokemonultrasunultramoon/))
|
||||
* pokemon-cry ([Cry Sound Effects (Gen 8)](https://www.sounds-resource.com/nintendo_switch/pokemonswordshield/))
|
||||
* pokemon-cry ([Cry Sound Effects (Gen 1-7)](https://www.sounds-resource.com/3ds/pokemonultrasunultramoon/))
|
||||
* whos-that-pokemon ([Cry Sound Effects (Gen 8)](https://www.sounds-resource.com/nintendo_switch/pokemonswordshield/))
|
||||
* whos-that-pokemon ([Cry Sound Effects (Gen 1-7)](https://www.sounds-resource.com/3ds/pokemonultrasunultramoon/))
|
||||
* whos-that-pokemon-cry ([Cry Sound Effects (Gen 8)](https://www.sounds-resource.com/nintendo_switch/pokemonswordshield/))
|
||||
|
||||
@@ -15,7 +15,8 @@ module.exports = class WhosThatPokemonCryCommand extends Command {
|
||||
duration: 10
|
||||
},
|
||||
guildOnly: true,
|
||||
userPermissions: ['CONNECT', 'SPEAK', 'ATTACH_FILES'],
|
||||
userPermissions: ['CONNECT', 'SPEAK'],
|
||||
clientPermissions: ['ATTACH_FILES'],
|
||||
credit: [
|
||||
{
|
||||
name: 'Pokémon',
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { reactIfAble } = require('../../util/Util');
|
||||
|
||||
module.exports = class PokemonCryCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'pokemon-cry',
|
||||
aliases: ['pokedex-cry', 'pokémon-cry', 'pokédex-cry'],
|
||||
group: 'voice',
|
||||
memberName: 'pokemon-cry',
|
||||
description: 'Plays a Pokémon\'s cry.',
|
||||
userPermissions: ['CONNECT', 'SPEAK'],
|
||||
throttling: {
|
||||
usages: 1,
|
||||
duration: 10
|
||||
},
|
||||
guildOnly: true,
|
||||
credit: [
|
||||
{
|
||||
name: 'Pokémon',
|
||||
url: 'https://www.pokemon.com/us/',
|
||||
reason: 'Original Game'
|
||||
},
|
||||
{
|
||||
name: 'PokéAPI',
|
||||
url: 'https://pokeapi.co/',
|
||||
reason: 'API'
|
||||
},
|
||||
{
|
||||
name: 'The Sounds Resource',
|
||||
url: 'https://www.sounds-resource.com/',
|
||||
reason: 'Cry Sound Effects (Gen 1-7)',
|
||||
reasonURL: 'https://www.sounds-resource.com/3ds/pokemonultrasunultramoon/'
|
||||
},
|
||||
{
|
||||
name: 'The Sounds Resource',
|
||||
url: 'https://www.sounds-resource.com/',
|
||||
reason: 'Cry Sound Effects (Gen 8)',
|
||||
reasonURL: 'https://www.sounds-resource.com/nintendo_switch/pokemonswordshield/'
|
||||
},
|
||||
{
|
||||
name: 'Pokémon Showdown',
|
||||
url: 'https://play.pokemonshowdown.com/',
|
||||
reason: 'Cry Sound Effects (Meltan and Melmetal)',
|
||||
reasonURL: 'https://play.pokemonshowdown.com/audio/cries/'
|
||||
}
|
||||
],
|
||||
args: [
|
||||
{
|
||||
key: 'pokemon',
|
||||
prompt: 'What Pokémon would you like to play the cry of?',
|
||||
type: 'string'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg, { pokemon }) {
|
||||
const connection = this.client.voice.connections.get(msg.guild.id);
|
||||
if (!connection) {
|
||||
const usage = this.client.registry.commands.get('join').usage();
|
||||
return msg.reply(`I am not in a voice channel. Use ${usage} to fix that!`);
|
||||
}
|
||||
try {
|
||||
const data = await this.client.pokemon.fetch(pokemon);
|
||||
if (!data) return msg.say('Could not find any results.');
|
||||
connection.play(data.cry);
|
||||
await reactIfAble(msg, this.client.user, '🔉');
|
||||
return null;
|
||||
} catch (err) {
|
||||
await reactIfAble(msg, this.client.user, '⚠️');
|
||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
}
|
||||
};
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "119.45.2",
|
||||
"version": "119.46.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user