
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (54)
-
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...) -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
MediaSPIP en mode privé (Intranet)
17 septembre 2013, parÀ partir de la version 0.3, un canal de MediaSPIP peut devenir privé, bloqué à toute personne non identifiée grâce au plugin "Intranet/extranet".
Le plugin Intranet/extranet, lorsqu’il est activé, permet de bloquer l’accès au canal à tout visiteur non identifié, l’empêchant d’accéder au contenu en le redirigeant systématiquement vers le formulaire d’identification.
Ce système peut être particulièrement utile pour certaines utilisations comme : Atelier de travail avec des enfants dont le contenu ne doit pas (...)
Sur d’autres sites (9114)
-
Why does My Discord bot stop playing music
27 septembre 2021, par KonglnwzaSo 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
 server_queue.connection.dispatcher.end();
 ^

TypeError: Cannot read property 'end' of null
 at skip_song (C:\Users\User\Desktop\Discord bot\Song\play.js:96:40)
 at Object.execute (C:\Users\User\Desktop\Discord bot\Song\play.js:65:47)
 at Client.<anonymous> (C:\Users\User\Desktop\Discord bot\bot.js:78:74)
 at Client.emit (node:events:394:28)
 at MessageCreateAction.handle (C:\Users\User\Desktop\Discord bot\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
 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)
 at WebSocketManager.handlePacket (C:\Users\User\Desktop\Discord bot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
 at WebSocketShard.onPacket (C:\Users\User\Desktop\Discord bot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)
 at WebSocketShard.onMessage (C:\Users\User\Desktop\Discord bot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
 at WebSocket.onMessage (C:\Users\User\Desktop\Discord bot\node_modules\ws\lib\event-target.js:132:16)
</anonymous>


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


npm i already installed


- 

- discord.js
- ytdl-core
- ytdl-search
and also i already installed ffmpeg in my computer and set the path








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


const ytdl = require('ytdl-core');
const ytSearch = require('yt-search');

const queue = new Map();

module.exports = {
 name: 'play',
 aliases: ['skip', 'stop', 'queue', 'leave', 'join'],
 description: 'Joins and play',
 async execute(message, args , cmd, client, Discord){
 const voice_channel = message.member.voice.channel;
 if(!voice_channel) return message.channel.send('เข้าไปอยู่ในดิสก่อนดิวะ :angry: ');//you must in voice channel
 
 
 const server_queue = queue.get(message.guild.id);
 if(cmd==='play' || cmd==='p'){
 if(!args.length) return message.channel.send('จะเปิดอะไรล่ะพี่ :triumph:');//you must have argument
 let song = {};

 if(ytdl.validateURL(args[0])){
 const song_info = await ytdl.getInfo(args[0]);
 song = {title: song_info.videoDetails.title, url: song_info.videoDetails.video_url}
 } else {
 const videoFinder = async (query) => {
 const videoResult = await ytSearch(query);
 return (videoResult.videos.length > 1) ? videoResult.videos[0] : null;
 }

 const video = await videoFinder(args.join(' '));
 if(video){
 song = {title: video.title, url: video.url}
 
 } else{
 message.channel.send('หาไม่เจอ :cry: ');//cant find song
 }
 }
 //const connection = await voiceChannel.join(); 
 if(!server_queue){
 const queue_constructor = {
 voice_channel: voice_channel,
 text_channel: message.channel,
 connection: null,
 songs: []
 }

 queue.set(message.guild.id, queue_constructor);
 queue_constructor.songs.push(song);

 try{
 const connection = await voice_channel.join();
 queue_constructor.connection = connection;
 video_player(message.guild, queue_constructor.songs[0]);
 } catch (err) {
 queue.delete(message.guild.id);
 message.channel.send('error');
 throw err;
 }
 } else{
 server_queue.songs.push(song);
 return message.channel.send(`:regional_indicator_k: :regional_indicator_o: :regional_indicator_n: :regional_indicator_g: :star_struck: **${song.title}** ใส่เข้าคิวแล้ว`)//added to queue
 }
 

 }
 else if(cmd === 'skip' || cmd ==='s') skip_song(message, server_queue);
 else if(cmd === 'clear' || cmd==='c') clear_song(message, server_queue);
 else if(cmd === 'join') join_song(message);
 else if(cmd === 'leave') leave_song(message);
 else if(cmd === 'queue' || cmd ==='q') queue_show(message,server_queue,Discord);


 }
}

const video_player = async (guild, song) => {
 const song_queue = queue.get(guild.id);

 if(!song){
 //song_queue.text_channel.send('ไปละบาย :kissing_heart: ');
 song_queue.voice_channel.leave();
 queue.delete(guild.id);
 return;
 }
 const stream = ytdl(song.url,{filter: 'audioonly'},{ highWaterMark: 1<<25 });
 song_queue.connection.play(stream, { seek: 0, volume: 0.5 })
 .on('finish', () => {
 song_queue.songs.shift();
 video_player(guild, song_queue.songs[0]);
 });
 await song_queue.text_channel.send(`:regional_indicator_k: :regional_indicator_o: :regional_indicator_n: :regional_indicator_g: :sunglasses: กำลังเล่นเด็ก ***${song.title}***`);//playing song
}

const skip_song = (message, server_queue) => {
 if(!message.member.voice.channel) return message.channel.send('เข้าดิสก่อนดิ :angry: ');//you must be in voice channel
 if(!server_queue) return message.channel.send('ไม่มีเพลงในคิวแล้ว :relieved: ');//no song in queue
 server_queue.connection.dispatcher.end();
}

const clear_song = (message, server_queue) => {
 if(!message.member.voice.channel) return message.channel.send('เข้าดิสก่อนดิ :angry: ');//you must be in voice channel
 if(!server_queue) return message.channel.send('ไม่มีเพลงในคิวแล้ว :relieved: ');//no song in queue
 server_queue.songs = [];
 server_queue.connection.dispatcher.end();
}

const join_song = (message) => {
 if(!message.member.voice.channel) return message.channel.send('เข้าดิสก่อนดิ :angry: ');//you must be in voice channel
 message.member.voice.channel.join();
}

const leave_song = (message) => {
 if(!message.member.voice.channel) return message.channel.send('เข้าดิสก่อนดิ :angry: ');//you must be in voice channel
 message.member.voice.channel.leave();
}

const queue_show = (message,server_queue,Discord) => {
 if(!server_queue) return message.channel.send('ไม่มีเพลงในคิวแล้ว :relieved: ');//no song in queue
 const queueList = server_queue.songs.map((song, i) => `[${++i}] - ${song.title}`);
 const queueEmbed = new Discord.MessageEmbed()
 .setDescription(queueList);
 message.channel.send(queueEmbed);
}```



-
Music discord.js bot : The "url" argument must be of type string
4 juin 2020, par NathanI 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 commandplay
, after the bot joins the voice channel and sendퟎ
-
Own music discord bot : FFmpeg/avconv not found. Can someone help me ?
23 mai 2020, par CreepyGamerCatI guess the code is right because the bot finds a song and also joins a voice channel, but it can't play songs, because of this error. The ffmpeg.exe, ffmplay.exe, ffm.probe.exe and YouTube-dl.exe files are in the same folder. (directory : desktop>Discord Bot>node_modules>bin.) Maybe this is a wrong folder, I forgot a important file or whatever. I hope you can help. I use Visual Studio Code in JavaScript.