Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (46)

  • Qu’est ce qu’un masque de formulaire

    13 juin 2013, par

    Un masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
    Chaque formulaire de publication d’objet peut donc être personnalisé.
    Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
    Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

  • Selection of projects using MediaSPIP

    2 mai 2011, par

    The examples below are representative elements of MediaSPIP specific uses for specific projects.
    MediaSPIP farm @ Infini
    The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)

Sur d’autres sites (3865)

  • 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.

    


    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.

    


    any advice would be greatly appreciated

    


  • 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;

  • Music discord.js bot : The "url" argument must be of type string

    4 juin 2020, par Nathan

    I am trying to make a working music Discord bot with discord.js and ffmpeg but I keep getting the error TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received type undefined. The error occurs when I try the command play, after the bot joins the voice channel and send