Setup...again

This commit is contained in:
ION606
2022-04-14 13:25:01 -04:00
parent b8ce2b8c68
commit 4ca09e072a
18 changed files with 874 additions and 1393 deletions
+27 -10
View File
@@ -6,15 +6,32 @@ const { VoiceConnectionStatus, AudioPlayerStatus } = require('@discordjs/voice')
module.exports = {
name: "playaudio",
execute(message, args, client) {
const channel = "930148609406685227";
//console.log(generateDependencyReport());
connection.on(VoiceConnectionStatus.Ready, (oldState, newState) => {
console.log('Connection is in the Ready state!');
});
const connection = joinVoiceChannel({
channelId: channel,
guildId: channel.guild,
adapterCreator: channel.guild.voiceAdapterCreator,
});
message.channel.send("This command has not been set up yet\nSorry!");
return;
// //const guild = client.guilds.cache.get(client.guild.id);
// const channel = client.guilds.channels.cache.get('930148609406685227');
// channel.join()
// .then(connection => console.log('Connected'))
// .catch(console.error);
// const { createAudioResource, createAudioPlayer } = require('@discordjs/voice');
// const player = createAudioPlayer();
// const resource = createAudioResource('/home/user/voice/music.mp3', {
// metadata: {
// title: 'A good song!',
// },
// });
// // Not recommended - listen to errors from the audio player instead for most usecases!
// resource.playStream.on('error', error => {
// console.error('Error:', error.message, 'with track', resource.metadata.title);
// });
// player.play(resource);
}
}