Version 0.3.0 - Ajout des premières fonctionnalités du Player

This commit is contained in:
2025-03-01 18:01:17 +01:00
parent c8c8fd71be
commit 2a934d14ae
16 changed files with 473 additions and 228 deletions

View File

@@ -9,11 +9,11 @@ async function play(instance, song) {
instance.player = createAudioPlayer()
instance.generatePlayerEvents()
const player = instance.player
song.resource = await createAudioResource(song.url, {
var resource = await createAudioResource(song.url, {
inputType: StreamType.Arbitrary
}) // Remplace par ton fichier audio
player.play(song.resource);
player.play(resource);
instance.connection.subscribe(player);
clog.log(`GUILD : ${instance.guildId} - Lecture de la musique (Media): ${song.title} - id : ${song.id}`)