Version 1.0.0 - Final Version (without Logo)
This commit is contained in:
		@@ -6,7 +6,7 @@ module.exports = {
 | 
			
		||||
 | 
			
		||||
    data: new SlashCommandBuilder()
 | 
			
		||||
    .setName("about")
 | 
			
		||||
    .setDescription("[NEW] Affiche les informations principales du bot !"),
 | 
			
		||||
    .setDescription("Affiche les informations principales du bot !"),
 | 
			
		||||
 | 
			
		||||
    async execute(client, interaction) {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -3,7 +3,7 @@ module.exports = {
 | 
			
		||||
 | 
			
		||||
    data:new SlashCommandBuilder()
 | 
			
		||||
    .setName("help")
 | 
			
		||||
    .setDescription("[NEW] Affiche toutes les commandes disponibles du bot"),
 | 
			
		||||
    .setDescription("Affiche toutes les commandes disponibles du bot"),
 | 
			
		||||
 | 
			
		||||
    async execute(client, interaction) {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@ module.exports = {
 | 
			
		||||
 | 
			
		||||
    data: new SlashCommandBuilder()
 | 
			
		||||
    .setName("leave")
 | 
			
		||||
    .setDescription("[NEW] Déconnecte le Bot !"),
 | 
			
		||||
    .setDescription("Déconnecte le Bot !"),
 | 
			
		||||
 | 
			
		||||
    async execute(client, interaction) {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@ module.exports = {
 | 
			
		||||
 | 
			
		||||
    data: new SlashCommandBuilder()
 | 
			
		||||
    .setName("pause")
 | 
			
		||||
    .setDescription("[NEW] Cette commande te permettera de mettre en pause ou de remettre le morceau en cours !"),
 | 
			
		||||
    .setDescription("Cette commande te permettera de mettre en pause ou de remettre le morceau en cours !"),
 | 
			
		||||
 | 
			
		||||
    async execute(client, interaction) {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@ module.exports = {
 | 
			
		||||
 | 
			
		||||
    data: new SlashCommandBuilder()
 | 
			
		||||
    .setName("play")
 | 
			
		||||
    .setDescription("[NEW] Permet de lire des titres comme des playlists depuis Youtube / SoundCloud / Vimeo !")
 | 
			
		||||
    .setDescription("Permet de lire des titres comme des playlists depuis Youtube / SoundCloud / Vimeo !")
 | 
			
		||||
    .addStringOption(option => option.setName("nom_ou_lien").setDescription("Lien ou nom du titre ou de la playlist").setRequired(true)),
 | 
			
		||||
 | 
			
		||||
    async execute(client, interaction) {
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@ module.exports = {
 | 
			
		||||
 | 
			
		||||
    data: new SlashCommandBuilder()
 | 
			
		||||
    .setName("previous")
 | 
			
		||||
    .setDescription("[NEW] Revenir à la chanson précédente."),
 | 
			
		||||
    .setDescription("Revenir à la chanson précédente."),
 | 
			
		||||
 | 
			
		||||
    async execute(client, interaction) {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@ module.exports = {
 | 
			
		||||
 | 
			
		||||
    data: new SlashCommandBuilder()
 | 
			
		||||
    .setName("report")
 | 
			
		||||
    .setDescription("[NEW] Donne le lien vers le panel !")
 | 
			
		||||
    .setDescription("Donne le lien vers le panel !")
 | 
			
		||||
    .addStringOption(option => option.setName("level").setDescription("Niveau du report").setRequired(true).addChoices(
 | 
			
		||||
        {name: "Majeur", value: "Majeur"},
 | 
			
		||||
        {name: "Mineur", value: "Mineur"},
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@ module.exports = {
 | 
			
		||||
 | 
			
		||||
    data: new SlashCommandBuilder()
 | 
			
		||||
    .setName("restart")
 | 
			
		||||
    .setDescription("[NEW] Redémarre intégralement le Bot !"),
 | 
			
		||||
    .setDescription("Redémarre intégralement le Bot !"),
 | 
			
		||||
 | 
			
		||||
    async execute(client, interaction) {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@ module.exports = {
 | 
			
		||||
 | 
			
		||||
    data: new SlashCommandBuilder()
 | 
			
		||||
    .setName("skip")
 | 
			
		||||
    .setDescription("[NEW] Passer à la chanson suivante."),
 | 
			
		||||
    .setDescription("Passer à la chanson suivante."),
 | 
			
		||||
 | 
			
		||||
    async execute(client, interaction) {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@ module.exports = {
 | 
			
		||||
 | 
			
		||||
    data: new SlashCommandBuilder()
 | 
			
		||||
    .setName("state")
 | 
			
		||||
    .setDescription("[NEW] Donne le titre de la musique !"),
 | 
			
		||||
    .setDescription("Donne le titre de la musique !"),
 | 
			
		||||
 | 
			
		||||
    async execute(client, interaction) {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@ module.exports = {
 | 
			
		||||
 | 
			
		||||
    data: new SlashCommandBuilder()
 | 
			
		||||
    .setName("web")
 | 
			
		||||
    .setDescription("[NEW] Donne le lien vers le panel !"),
 | 
			
		||||
    .setDescription("Donne le lien vers le panel !"),
 | 
			
		||||
 | 
			
		||||
    async execute(client, interaction) {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -43,26 +43,39 @@ module.exports.play = async function (client, interaction) {
 | 
			
		||||
 | 
			
		||||
            const songs = await client.manager.search(song_name)
 | 
			
		||||
 | 
			
		||||
            if(!player.playing) {
 | 
			
		||||
              
 | 
			
		||||
                player.play(songs.tracks[0])
 | 
			
		||||
    
 | 
			
		||||
            if(songs.tracks.length == 0) {
 | 
			
		||||
                const embed = await new EmbedBuilder()
 | 
			
		||||
                .setColor(0x15e6ed)
 | 
			
		||||
                .setTitle('**Lecture de : **' + songs.tracks[0].title)
 | 
			
		||||
                .setDescription('**Demandé par **' + interaction.member.user.username)
 | 
			
		||||
                .addFields({name: "Auteur", value: songs.tracks[0].author},
 | 
			
		||||
                           {name: "URL", value:songs.tracks[0].uri})
 | 
			
		||||
                .setThumbnail(songs.tracks[0].thumbnail)
 | 
			
		||||
                .setColor(0xff0000)
 | 
			
		||||
                .setTitle('*On connait pas le morceau !*')
 | 
			
		||||
                .setTimestamp();
 | 
			
		||||
    
 | 
			
		||||
                interaction.reply({embeds: [embed]})
 | 
			
		||||
                interaction.reply({embeds: [embed], ephemeral: true})
 | 
			
		||||
 | 
			
		||||
            } else {
 | 
			
		||||
 | 
			
		||||
                list.add(songs.tracks[0], interaction)
 | 
			
		||||
                
 | 
			
		||||
                if(!player.playing) {
 | 
			
		||||
              
 | 
			
		||||
                    player.play(songs.tracks[0])
 | 
			
		||||
        
 | 
			
		||||
                    const embed = await new EmbedBuilder()
 | 
			
		||||
                    .setColor(0x15e6ed)
 | 
			
		||||
                    .setTitle('**Lecture de : **' + songs.tracks[0].title)
 | 
			
		||||
                    .setDescription('**Demandé par **' + interaction.member.user.username)
 | 
			
		||||
                    .addFields({name: "Auteur", value: son.tracks[0].author},
 | 
			
		||||
                               {name: "URL", value:songs.tragscks[0].uri})
 | 
			
		||||
                    .setThumbnail(songs.tracks[0].thumbnail)
 | 
			
		||||
                    .setTimestamp();
 | 
			
		||||
        
 | 
			
		||||
                    interaction.reply({embeds: [embed]})
 | 
			
		||||
                } else {
 | 
			
		||||
    
 | 
			
		||||
                    list.add(songs.tracks[0], interaction)
 | 
			
		||||
                    
 | 
			
		||||
                }
 | 
			
		||||
               
 | 
			
		||||
            }
 | 
			
		||||
           
 | 
			
		||||
 | 
			
		||||
          
 | 
			
		||||
            
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -461,24 +461,44 @@ socket.on("ANSWER/GET/PLAYLIST", (data) => {
 | 
			
		||||
    const addPlaylist_dialog = document.getElementById("createPlaylist_dialog")
 | 
			
		||||
    const addPlaylist_close = document.getElementById("createPlaylist_close")
 | 
			
		||||
    const apText = document.getElementById("apText")
 | 
			
		||||
    const apInfo = document.getElementById("apInfo")
 | 
			
		||||
    const apCreate = document.getElementById("apCreate")
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    addPlaylist_close.addEventListener("click", () => {
 | 
			
		||||
        
 | 
			
		||||
        apInfo.innerHTML = ""
 | 
			
		||||
        addPlaylist_dialog.close()
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
    addPlaylist.addEventListener("click", () => {
 | 
			
		||||
        
 | 
			
		||||
        apText.value = ""
 | 
			
		||||
        apText.innerHTML = ""
 | 
			
		||||
        addPlaylist_dialog.showModal()
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
    apCreate.addEventListener("click", () => {
 | 
			
		||||
        apInfo.innerHTML = ""
 | 
			
		||||
        var wrongName = true
 | 
			
		||||
 | 
			
		||||
        addPlaylist_dialog.close()
 | 
			
		||||
        send("CREATE_PLAYLIST", apText.value)
 | 
			
		||||
        const refusedChar = ['\\','/' ,':' ,'*','?' ,'"','<','>','|']
 | 
			
		||||
 | 
			
		||||
            for(var char of refusedChar) {
 | 
			
		||||
 | 
			
		||||
                if(apText.value.includes(char)) {
 | 
			
		||||
                    wrongName = false
 | 
			
		||||
 | 
			
		||||
                } 
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
        if(apText.value != "" && apText.value != " " && wrongName) {
 | 
			
		||||
 | 
			
		||||
            addPlaylist_dialog.close()
 | 
			
		||||
            send("CREATE_PLAYLIST", apText.value)
 | 
			
		||||
        } else {
 | 
			
		||||
 | 
			
		||||
            apInfo.innerHTML = "<span style='red'>Le nom n'est pas valide !</style>"
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -401,8 +401,8 @@ p {
 | 
			
		||||
.rsend {
 | 
			
		||||
  color: white;
 | 
			
		||||
  margin: 2%;
 | 
			
		||||
  padding: 1%;
 | 
			
		||||
  align-self: center;
 | 
			
		||||
  width: 20%;
 | 
			
		||||
  background-color: transparent;
 | 
			
		||||
  border: none;
 | 
			
		||||
  border-style: solid;
 | 
			
		||||
 
 | 
			
		||||
@@ -55,6 +55,7 @@
 | 
			
		||||
                    </div>
 | 
			
		||||
                    <div class="apContent">
 | 
			
		||||
                        <img class="apTile" src="/images/playlist-tile.svg">
 | 
			
		||||
                        <p  style='color: red; padding-bottom: 0;' id="apInfo"></p>
 | 
			
		||||
                        <p>Nom de la playlist</p>
 | 
			
		||||
                        <input type="text" id="apText">
 | 
			
		||||
                        <button id="apCreate" class="rsend"><i class="fa fa-plus"></i> Créer</button>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user