Recherche avancée

Médias (1)

Mot : - Tags -/ticket

Autres articles (36)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

Sur d’autres sites (7302)

  • Why does My Discord bot stop playing music

    27 septembre 2021, par Konglnwza

    So My Discord bot will be able to play music for a while then it will stop and i have to restart the bot to fix it.
And if it stopped then i use command skip it will crash the bot with the errors below

    


    C:\Users\User\Desktop\Discord bot\Song\play.js:96&#xA;    server_queue.connection.dispatcher.end();&#xA;                                       ^&#xA;&#xA;TypeError: Cannot read property &#x27;end&#x27; of null&#xA;    at skip_song (C:\Users\User\Desktop\Discord bot\Song\play.js:96:40)&#xA;    at Object.execute (C:\Users\User\Desktop\Discord bot\Song\play.js:65:47)&#xA;    at Client.<anonymous> (C:\Users\User\Desktop\Discord bot\bot.js:78:74)&#xA;    at Client.emit (node:events:394:28)&#xA;    at MessageCreateAction.handle (C:\Users\User\Desktop\Discord bot\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)&#xA;    at Object.module.exports [as MESSAGE_CREATE] (C:\Users\User\Desktop\Discord bot\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)&#xA;    at WebSocketManager.handlePacket (C:\Users\User\Desktop\Discord bot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)&#xA;    at WebSocketShard.onPacket (C:\Users\User\Desktop\Discord bot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)&#xA;    at WebSocketShard.onMessage (C:\Users\User\Desktop\Discord bot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)&#xA;    at WebSocket.onMessage (C:\Users\User\Desktop\Discord bot\node_modules\ws\lib\event-target.js:132:16)&#xA;</anonymous>

    &#xA;

    I guess the problem is something with ffmpeg or i must have some npms more.

    &#xA;

    npm i already installed

    &#xA;

      &#xA;
    • discord.js
    • &#xA;

    • ytdl-core
    • &#xA;

    • ytdl-search&#xA;and also i already installed ffmpeg in my computer and set the path
    • &#xA;

    &#xA;

    i want to ask that do i have to install any npms more ? or anyone know how to fixed this problem ?

    &#xA;

    const ytdl = require(&#x27;ytdl-core&#x27;);&#xA;const ytSearch = require(&#x27;yt-search&#x27;);&#xA;&#xA;const queue = new Map();&#xA;&#xA;module.exports = {&#xA;    name: &#x27;play&#x27;,&#xA;    aliases: [&#x27;skip&#x27;, &#x27;stop&#x27;, &#x27;queue&#x27;, &#x27;leave&#x27;, &#x27;join&#x27;],&#xA;    description: &#x27;Joins and play&#x27;,&#xA;    async execute(message, args , cmd, client, Discord){&#xA;        const voice_channel = message.member.voice.channel;&#xA;        if(!voice_channel) return message.channel.send(&#x27;เข้าไปอยู่ในดิสก่อนดิวะ :angry: &#x27;);//you must in voice channel&#xA;        &#xA;        &#xA;        const server_queue = queue.get(message.guild.id);&#xA;        if(cmd===&#x27;play&#x27; || cmd===&#x27;p&#x27;){&#xA;            if(!args.length) return message.channel.send(&#x27;จะเปิดอะไรล่ะพี่ :triumph:&#x27;);//you must have argument&#xA;            let song = {};&#xA;&#xA;            if(ytdl.validateURL(args[0])){&#xA;                const song_info = await ytdl.getInfo(args[0]);&#xA;                song = {title: song_info.videoDetails.title, url: song_info.videoDetails.video_url}&#xA;            } else {&#xA;                const videoFinder = async (query) => {&#xA;                    const videoResult = await ytSearch(query);&#xA;                    return (videoResult.videos.length > 1) ? videoResult.videos[0] : null;&#xA;                }&#xA;&#xA;                const video = await videoFinder(args.join(&#x27; &#x27;));&#xA;                if(video){&#xA;                    song = {title: video.title, url: video.url}&#xA;                &#xA;                } else{&#xA;                    message.channel.send(&#x27;หาไม่เจอ :cry: &#x27;);//cant find song&#xA;                }&#xA;            }&#xA;            //const connection = await voiceChannel.join(); &#xA;            if(!server_queue){&#xA;                const queue_constructor = {&#xA;                    voice_channel: voice_channel,&#xA;                    text_channel: message.channel,&#xA;                    connection: null,&#xA;                    songs: []&#xA;                }&#xA;&#xA;                queue.set(message.guild.id, queue_constructor);&#xA;                queue_constructor.songs.push(song);&#xA;&#xA;                try{&#xA;                    const connection = await voice_channel.join();&#xA;                    queue_constructor.connection = connection;&#xA;                    video_player(message.guild, queue_constructor.songs[0]);&#xA;                } catch (err) {&#xA;                    queue.delete(message.guild.id);&#xA;                    message.channel.send(&#x27;error&#x27;);&#xA;                    throw err;&#xA;                }&#xA;            } else{&#xA;                server_queue.songs.push(song);&#xA;                return message.channel.send(`:regional_indicator_k: :regional_indicator_o: :regional_indicator_n: :regional_indicator_g: :star_struck: **${song.title}** ใส่เข้าคิวแล้ว`)//added to queue&#xA;            }&#xA;            &#xA;&#xA;        }&#xA;        else if(cmd === &#x27;skip&#x27; || cmd ===&#x27;s&#x27;) skip_song(message, server_queue);&#xA;        else if(cmd === &#x27;clear&#x27; || cmd===&#x27;c&#x27;) clear_song(message, server_queue);&#xA;        else if(cmd === &#x27;join&#x27;) join_song(message);&#xA;        else if(cmd === &#x27;leave&#x27;) leave_song(message);&#xA;        else if(cmd === &#x27;queue&#x27; || cmd ===&#x27;q&#x27;) queue_show(message,server_queue,Discord);&#xA;&#xA;&#xA;    }&#xA;}&#xA;&#xA;const video_player = async (guild, song) => {&#xA;    const song_queue = queue.get(guild.id);&#xA;&#xA;    if(!song){&#xA;        //song_queue.text_channel.send(&#x27;ไปละบาย :kissing_heart: &#x27;);&#xA;        song_queue.voice_channel.leave();&#xA;        queue.delete(guild.id);&#xA;        return;&#xA;    }&#xA;    const stream = ytdl(song.url,{filter: &#x27;audioonly&#x27;},{ highWaterMark: 1&lt;&lt;25 });&#xA;    song_queue.connection.play(stream, { seek: 0, volume: 0.5 })&#xA;    .on(&#x27;finish&#x27;, () => {&#xA;        song_queue.songs.shift();&#xA;        video_player(guild, song_queue.songs[0]);&#xA;    });&#xA;    await song_queue.text_channel.send(`:regional_indicator_k: :regional_indicator_o: :regional_indicator_n: :regional_indicator_g: :sunglasses: กำลังเล่นเด็ก ***${song.title}***`);//playing song&#xA;}&#xA;&#xA;const skip_song = (message, server_queue) => {&#xA;    if(!message.member.voice.channel) return message.channel.send(&#x27;เข้าดิสก่อนดิ :angry: &#x27;);//you must be in voice channel&#xA;    if(!server_queue) return message.channel.send(&#x27;ไม่มีเพลงในคิวแล้ว :relieved: &#x27;);//no song in queue&#xA;    server_queue.connection.dispatcher.end();&#xA;}&#xA;&#xA;const clear_song = (message, server_queue) => {&#xA;    if(!message.member.voice.channel) return message.channel.send(&#x27;เข้าดิสก่อนดิ :angry: &#x27;);//you must be in voice channel&#xA;    if(!server_queue) return message.channel.send(&#x27;ไม่มีเพลงในคิวแล้ว :relieved: &#x27;);//no song in queue&#xA;    server_queue.songs = [];&#xA;    server_queue.connection.dispatcher.end();&#xA;}&#xA;&#xA;const join_song = (message) => {&#xA;    if(!message.member.voice.channel) return message.channel.send(&#x27;เข้าดิสก่อนดิ :angry: &#x27;);//you must be in voice channel&#xA;    message.member.voice.channel.join();&#xA;}&#xA;&#xA;const leave_song = (message) => {&#xA;    if(!message.member.voice.channel) return message.channel.send(&#x27;เข้าดิสก่อนดิ :angry: &#x27;);//you must be in voice channel&#xA;    message.member.voice.channel.leave();&#xA;}&#xA;&#xA;const queue_show =  (message,server_queue,Discord) => {&#xA;    if(!server_queue) return message.channel.send(&#x27;ไม่มีเพลงในคิวแล้ว :relieved: &#x27;);//no song in queue&#xA;    const queueList = server_queue.songs.map((song, i) => `[${&#x2B;&#x2B;i}] - ${song.title}`);&#xA;    const queueEmbed = new Discord.MessageEmbed()&#xA;    .setDescription(queueList);&#xA;    message.channel.send(queueEmbed);&#xA;}```&#xA;

    &#xA;

  • Heroku Python Discord music bot no sound [closed]

    15 septembre 2022, par olfis

    I just created python discord bot using youtube_dl and discord.py&#xA;I wanted to keep it live 24/7 on Heroku but there is one issue...&#xA;My bot is working good on my PC, but when I run it from Heroku bot just joins voice channel, adds songs to queue but I can't hear anything, his audio it's always off...

    &#xA;

    Here's a screenshot of installe buildpacks on heroku.&#xA;Buildpakcs screenshot

    &#xA;

  • Discord music Bot Python starts ffmpeg, green light appears around bot but no audio plays [closed]

    27 avril 2023, par QuestionHaver99

    I've tried using FFmpegOpusAudio and FFMPEGPCMaudio instead, but it gives the same issue. FFMPEG starts and the green light of the bot in the channel shows, but no audio plays, and then the bot exits the channel when the song should be over and FFMPEG terminates. I've tried streaming the audio and playing from a local file, and the same issue.

    &#xA;

    and just as a quick checklist of confirmed not the issues : the volume is fine and the permissions are fine and ffmpeg is in environment variables and set up correctly.

    &#xA;

    any advice would be greatly appreciated

    &#xA;