
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 (36)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne 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, parFormulaire 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 2011Vous 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 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);
}```



-
Heroku Python Discord music bot no sound [closed]
15 septembre 2022, par olfisI just created python discord bot using youtube_dl and discord.py
I wanted to keep it live 24/7 on Heroku but there is one issue...
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...


Here's a screenshot of installe buildpacks on heroku.
Buildpakcs screenshot


-
Discord music Bot Python starts ffmpeg, green light appears around bot but no audio plays [closed]
27 avril 2023, par QuestionHaver99I'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