Recherche avancée

Médias (91)

Autres articles (55)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (7158)

  • I got that error when i try to play music with my bot on discord

    20 septembre 2020, par TheKillerBoss 27

    (node:10076) UnhandledPromiseRejectionWarning : TypeError : Cannot read property 'id' of undefined
at play (C :\Users\USER\Desktop\Giochi e Programmi\Foto video ecc\Proggetti\Discord-bot\Akagi-chan\Akagi_chan.js:49:51)
at C :\Users\USER\Desktop\Giochi e Programmi\Foto video ecc\Proggetti\Discord-bot\Akagi-chan\Akagi_chan.js:89:17
    
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:10076) UnhandledPromiseRejectionWarning : Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id : 1)
(node:10076) [DEP0018] DeprecationWarning : Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

    


    const Discord = require('discord.js');
const bot = new Discord.Client();

const ytdl = require("ytdl-core");

const token = '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'

var versione = '1.0.1';
var autore = 'TheKillerBoss';
var servers = {};

const PREFIX = '!';

bot.on('ready', () =>{
    console.log('Online!');
    bot.user.setActivity('Kawaii!', {type: "PLAYING"});
})

bot.on('message', message=>{

    let args = message.content.substring(PREFIX.length).split(" ");

    switch(args[0])
    {
        case 'help':
            message.channel.send('ping --> pong!')
            message.channel.send('twitch --> canale twitch')
            message.channel.send('twitter --> pagina twitter')
            break;
        case 'ping':
            message.channel.send('pong!')
            break;
        case 'twitch':
            message.channel.send('Segui TheKilleBoss su Twitch! https://twitch.tv/thekillerboss_27')
            break;
        case 'twitter':
            message.channel.send('Segui TheKilleBoss su Twitter https://twitter.com/TheKillerBoss27')
            break;
        case 'versione':
            message.channel.send('Versione: ' + versione)
            break;
        case 'autore':
            message.channel.send('Autore: ' + autore)
            break;
        case 'play':
            function play(connection, message)
            {
                var server = servers(message.guid.id);

                server.dispatcher = connection.play(ytdl(server.queue[0], {filter: "audioonly"}));

                server.queue.shift();

                server.dispatcher.on("end", function()
                {
                    if(server.queue[0])
                    {
                        play(connection, message);
                    }
                    else
                    {
                        connection.disconnect();
                    }
                });
            
             }
            if(!args[1])
            {
                message.channel.send("Devi inserire un link!");
                return;
            }

            if(!message.member.voice.channel)
            {
                message.channel.send("Devi essere in un canale vocale!");
                return;
            }

            if (!servers[message.guild.id]) servers[message.guild.id] = {
                queue: []
            }

            var server = servers[message.guild.id];

            server.queue.push(args[1]);

    if(!message.member.voice.connection)message.member.voice.channel.join().then(function(connection){
            play(connection, message);
        })

    
        break;
    
}
})


bot.login(token);


    


    so the bot enters the voice channel but does not start the music and it give me that error.
I removed the token for privacy.

    


  • Discord BOT Music player : plays 3 songs at once

    15 août 2020, par LaCalienta

    I am developing my Discord bot that plays music, I am using DSahrpPlus as a wrapper and got the bot mostly working

    


    Commands get parsed corecly

    


    using System;
using System.Diagnostics;
using System.IO;
using System.Threading.Tasks;

using DSharpPlus;
using DSharpPlus.CommandsNext;
using DSharpPlus.CommandsNext.Attributes;
using DSharpPlus.Entities;
using DSharpPlus.VoiceNext;

using WolfBot.Attributes;
using WolfBot.Commands.Music;

namespace WolfBot.Commands
{
    class MusicCommands : BaseCommandModule
    {
        int SongID = 1;
        MusicPlayer player;
        [Command("join")]
        [RequirePermissionsCustom(Permissions.UseVoice)]
        public async Task Join(CommandContext ctx)
        {
            //Initialize music player
            player = new MusicPlayer(ctx);

            var vnext = ctx.Client.GetVoiceNext();

            var vnc = vnext.GetConnection(ctx.Guild);
            if (vnc != null)
            {
                await ctx.RespondAsync("Already connected in this guild.");
                throw new InvalidOperationException("Already connected in this guild.");
            }

            var chn = ctx.Member?.VoiceState?.Channel;
            if (chn == null)
            {
                await ctx.RespondAsync("You need to be in a voice channel.");
                throw new InvalidOperationException("You need to be in a voice channel.");
            }

            vnc = await vnext.ConnectAsync(chn);
            await ctx.RespondAsync(DiscordEmoji.FromName(ctx.Client, ":ok_hand:")); //-
  • When I try to play my Music Discord Bot it doesn't play music

    1er juin 2020, par EthanDevelops

    When I try to play my Music Discord Bot it doesn't play music. It uses ytdl-core and ffmpeg
My code is :

    



    const Discord = require('discord.js');
const bot = new Discord.Client

const ytdl = require("ytdl-core")


const token = 'API TOKEN'

const PREFIX = '?';

var version = '1.2';

var servers = {};

bot.on('ready', () =>{
    console.log('This bot is online!' + version);
})

bot.on('message', message => {

    let args = message.content.substring(PREFIX.length).split(" ");

    switch(args[0]){
        case 'play':

            function play(connection, message){
                var server = servers[message.guild.id];

                server.dispatcher = connection.play(ytdl(server.queue[0], {filter: "audioonly"}))

                server.queue.shift();

                server.dispatcher.on("end", function(){
                    if(server.queue[0]){
                        play(connection, message);
                    }else {
                        connection.disconnect();
                    }
                });



            }



            if(!args[1]){
                message.channel.send("You need to provide a link!")
                return;
            }

            if(!message.member.voice.channel){
               message.channel.send("You must be in a Voice Channel to play the bot!")
               return;
            }

            if(!servers[message.guild.id]) servers[message.guild.id] = {
                queue: []
            }

            var server = servers[message.guild.id];

            server.queue.push(args[1]);

            if(!message.guild.voice) message.member.voice.channel.join().then(function(connection){
                play(connection, message);
            })

        break;
    }



    });


    bot.login(token);


    



    Whenever I try to play a song this error happens :

    



    


    (node:5180) UnhandledPromiseRejectionWarning : Error : FFmpeg/avconv not
 found !
 at Function.getInfo (C :\Users\picar\Desktop\DiscordMusicBot\node_modules\prism-media\src\core\FFmpeg.js:130:11)
 at Function.create (C :\Users\picar\Desktop\DiscordMusicBot\node_modules\prism-media\src\core\FFmpeg.js:143:38)
 at new FFmpeg (C :\Users\picar\Desktop\DiscordMusicBot\node_modules\prism-media\src\core\FFmpeg.js:44:27)
 at AudioPlayer.playUnknown (C :\Users\picar\Desktop\DiscordMusicBot\node_modules\discord.js\src\client\voice\player\BasePlayer.js:47:20)
 at VoiceConnection.play (C :\Users\picar\Desktop\DiscordMusicBot\node_modules\discord.js\src\client\voice\util\PlayInterface.js:71:28)
 at play (C :\Users\picar\Desktop\DiscordMusicBot\index.js:29:48)
 at C :\Users\picar\Desktop\DiscordMusicBot\index.js:66:17
 at processTicksAndRejections (internal/process/task_queues.js:97:5)
 (node:5180) UnhandledPromiseRejectionWarning : Unhandled promise rejection. This error originated either by throwing inside of an async
 function without a catch block, or by rejecting a promise which was
 not handled with .catch(). To terminate the node process on unhandled
 promise rejection, use the CLI flag --unhandled-rejections=strict
 (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode).
 (rejection id : 1)
 (node:5180) [DEP0018] DeprecationWarning : Unhandled promise rejections are deprecated. In the future, promise rejections that are
 not handled will terminate the Node.js process with a non-zero exit
 code

    


    



    I'm getting very frustrated as the tutorial I'm watching is using a different version of everything !!! Please help.