mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-22 10:19:11 +02:00
Fix who-pokemon
This commit is contained in:
@@ -95,10 +95,10 @@ module.exports = class WhosThatPokemonCommand extends Command {
|
|||||||
const attachment = await this.createImage(data, true);
|
const attachment = await this.createImage(data, true);
|
||||||
const answerAttachment = await this.createImage(data, false);
|
const answerAttachment = await this.createImage(data, false);
|
||||||
const connection = msg.guild ? getVoiceConnection(msg.guild.id) : null;
|
const connection = msg.guild ? getVoiceConnection(msg.guild.id) : null;
|
||||||
|
const resource = createAudioResource(
|
||||||
|
path.join(__dirname, '..', '..', 'assets', 'sounds', 'whos-that-pokemon.mp3')
|
||||||
|
);
|
||||||
if (msg.guild && connection && !this.client.dispatchers.has(msg.guild.id)) {
|
if (msg.guild && connection && !this.client.dispatchers.has(msg.guild.id)) {
|
||||||
const resource = createAudioResource(
|
|
||||||
path.join(__dirname, '..', '..', 'assets', 'sounds', 'whos-that-pokemon.mp3')
|
|
||||||
);
|
|
||||||
const dispatcher = createAudioPlayer();
|
const dispatcher = createAudioPlayer();
|
||||||
connection.subscribe(dispatcher);
|
connection.subscribe(dispatcher);
|
||||||
dispatcher.play(resource);
|
dispatcher.play(resource);
|
||||||
|
|||||||
Reference in New Issue
Block a user