Fix pokedex audio

This commit is contained in:
Dragon Fire
2024-03-20 16:44:06 -04:00
parent bd6fe1d4d7
commit 845e57c725
+1 -1
View File
@@ -112,7 +112,7 @@ module.exports = class PokedexCommand extends Command {
.addField(' Gender Rate', pokemon.genderRate.genderless
? 'Genderless'
: `♂️ ${pokemon.genderRate.male}% ♀️ ${pokemon.genderRate.female}%`);
if (msg.guild && pokemon.cry && !this.client.dispatchers.has(msg.guild.id)) {
if (msg.guild && pokemon.cry) {
const connection = msg.guild ? this.client.dispatchers.get(msg.guild.id) : null;
if (connection) {
connection.play(pokemon.cry);