Version 1.0.2 - STABLE - Backend complété et prêt à l'usage

This commit is contained in:
2025-05-05 19:48:47 +02:00
parent 3aa4201dd2
commit e686edb0e6
23 changed files with 317 additions and 170 deletions

View File

@@ -7,18 +7,19 @@ const spotify = require("../../media/SpotifyInformation");
const command = new Command("play", "Jouer une musique à partir d'un lien dans un salon vocal", async (client, interaction) => {
if(!interaction.member.voice.channel) return new EmbedError("Vous devez rejoindre un salon vocal pour jouer une musique !").send(interaction)
if(!interaction.member.voice.channel) return new EmbedError("Vous devez rejoindre un salon vocal pour jouer une musique !", interaction)
const url = interaction.options.get("url")
const channel = interaction.member.voice.channel
const now = interaction.options.getBoolean("now") || false
const embed = new Embed(interaction)
await Finder.search(url.value).then(async (song) => {
if(!song) return new EmbedError("Impossible de trouver la musique à partir du lien donné ou des mots clés donnés").send(interaction)
if(!song) return embed.returnError("Impossible de trouver la musique à partir du lien donné ou des mots clés donnés")
const player = new Player(channel.guildId)
player.join(channel)
const embed = new Embed()
embed.setColor(0x15e6ed)
// Check if song is playlist
@@ -56,7 +57,7 @@ const command = new Command("play", "Jouer une musique à partir d'un lien dans
embed.setTitle("Ajoutée à la file d'attente")
}
embed.send(interaction)
embed.send()
if(song instanceof Playlist) {
if(song.type == "spotify") {