
Recherche avancée
Autres articles (79)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
Sur d’autres sites (8143)
-
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 LaCalientaI 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 EthanDevelopsWhen 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.