mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 14:00:22 +02:00
One last thing
This commit is contained in:
@@ -45,6 +45,7 @@ module.exports = class SoundboardCommand extends Command {
|
|||||||
if (this.client.voiceConnections.has(channel.guild.id)) return msg.say('I am already playing a sound.');
|
if (this.client.voiceConnections.has(channel.guild.id)) return msg.say('I am already playing a sound.');
|
||||||
try {
|
try {
|
||||||
const connection = await channel.join();
|
const connection = await channel.join();
|
||||||
|
await msg.react('🔉');
|
||||||
const dispatcher = connection.playFile(path.join(__dirname, '..', '..', 'assets', 'sounds', `${sound}.mp3`));
|
const dispatcher = connection.playFile(path.join(__dirname, '..', '..', 'assets', 'sounds', `${sound}.mp3`));
|
||||||
dispatcher.once('end', async () => {
|
dispatcher.once('end', async () => {
|
||||||
channel.leave();
|
channel.leave();
|
||||||
|
|||||||
Reference in New Issue
Block a user