
Recherche avancée
Médias (29)
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (52)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (7217)
-
I tried programming a discord bot for music, it joins the channel, it apparently "speaks" but i can't hear anything
2 avril 2020, par boraxI tried to code it alone, but I got the same problem, then I copied the code from https://gabrieltanner.org/blog/dicord-music-bot and it persists. I have downloaded FFmpeg, but I still think the problem lies there. Any suggestions ? (it's my first time here, I don't know how much of the code is relevant, also, i get this Error : FFmpeg/avconv not found !)



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

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

const token = 'REDACTED';

const prefix = '$';

var version = '1.1.2';

var servers = {};

const queue = new Map();

client.on('ready', () => {
 console.log('BOT is online');
})
client.once("ready", () => {
 console.log("Ready!");
 });

 client.once("reconnecting", () => {
 console.log("Reconnecting!");
 });

 client.once("disconnect", () => {
 console.log("Disconnect!");
 });

 client.on("message", async message => {
 if (message.author.bot) return;
 if (!message.content.startsWith(prefix)) return;

 const serverQueue = queue.get(message.guild.id);

 if (message.content.startsWith(`${prefix}play`)) {
 execute(message, serverQueue);
 return;
 } else if (message.content.startsWith(`${prefix}skip`)) {
 skip(message, serverQueue);
 return;
 } else if (message.content.startsWith(`${prefix}stop`)) {
 stop(message, serverQueue);
 return;
 } else {
 message.channel.send("You need to enter a valid command!");
 }
 });

 async function execute(message, serverQueue) {
 const args = message.content.split(" ");

 const voiceChannel = message.member.voice.channel;
 if (!voiceChannel)
 return message.channel.send(
 "You need to be in a voice channel to play music!"
 );
 const permissions = voiceChannel.permissionsFor(message.client.user);
 if (!permissions.has("CONNECT") || !permissions.has("SPEAK")) {
 return message.channel.send(
 "I need the permissions to join and speak in your voice channel!"
 );
 }

 const songInfo = await ytdl.getInfo(args[1]);
 const song = {
 title: songInfo.title,
 url: songInfo.video_url
 };

 if (!serverQueue) {
 const queueContruct = {
 textChannel: message.channel,
 voiceChannel: voiceChannel,
 connection: null,
 songs: [],
 volume: 5,
 playing: true
 };

 queue.set(message.guild.id, queueContruct);

 queueContruct.songs.push(song);

 try {
 var connection = await voiceChannel.join();
 queueContruct.connection = connection;
 play(message.guild, queueContruct.songs[0]);
 } catch (err) {
 console.log(err);
 queue.delete(message.guild.id);
 return message.channel.send(err);
 }
 } else {
 serverQueue.songs.push(song);
 return message.channel.send(`${song.title} has been added to the queue!`);
 }
 }

 function skip(message, serverQueue) {
 if (!message.member.voice.channel)
 return message.channel.send(
 "You have to be in a voice channel to stop the music!"
 );
 if (!serverQueue)
 return message.channel.send("There is no song that I could skip!");
 serverQueue.connection.dispatcher.end();
 }

 function stop(message, serverQueue) {
 if (!message.member.voice.channel)
 return message.channel.send(
 "You have to be in a voice channel to stop the music!"
 );
 serverQueue.songs = [];
 serverQueue.connection.dispatcher.end();
 }

 function play(guild, song) {
 const serverQueue = queue.get(guild.id);
 if (!song) {
 serverQueue.voiceChannel.leave();
 queue.delete(guild.id);
 return;
 }

 const dispatcher = serverQueue.connection
 .play(ytdl(song.url))
 .on("finish", () => {
 serverQueue.songs.shift();
 play(guild, serverQueue.songs[0]);
 })
 .on("error", error => console.error(error));
 dispatcher.setVolumeLogarithmic(serverQueue.volume / 5);
 serverQueue.textChannel.send(`Start playing: **${song.title}**`);
 }

client.login(token);



-
How do I make my Discord Bot play mp3 files, while in a voice Channel ? (FFMPEG problem)
27 mars 2019, par João PimentaI’m trying to make a bot that joins the voice channel, plays a mp3 file from my computer, and leaves the channel afterwards.
It "does" work, joins, leaves, but it doesn’t plays any sound, sometimes it produces static-like noises though, which made me think it is a FFMPEG problem.
I’m on a ubuntu 16.04.
I have tried changing the way I show the function what the path is for my .mp3 file. I came to the conclusion that
('/home/user/djsBot/01.mp3');
is the correct way to do it (the documentation asks for an absolute path), because I thought it wasn’t able to locate my file.I have also tried uninstalling and installing ffmpeg-binaries, same for node-opus, both of which give me moderate vulnerability reports (not sure what this means) and tell to run
npm audit fix
.I’m somewhat new to ubuntu, and a complete beginner on JS and Node.JS, so any tips or clarification are welcome. :)
client.on('message', (msg) => {
if (msg.content === '1') { // user types '1' to play a sound
if (msg.member.voiceChannel) {
msg.member.voiceChannel.join() // bot joins user's channel
.then(connection => {
const dispatcher = connection.playFile('/home/user/djsBot/01.mp3');
dispatcher.on("end", end => {
msg.member.voiceChannel.leave();
});
}).catch(err => {
console.log(err);
});
}
else {
msg.channel.send(`You must be in a Voice Channel for me to talk to you, ${msg.author.username}!`);
}
}
}); -
Font Family not rendering properly through subtitle ass in ffmpeg [closed]
30 novembre 2020, par Konduri Sai AdityaSome of the font family's like Pacifico are not rendering properly with the requested font size through .ass file in ffmpeg. Although some other fonts are rendered properly with similar font size. Any reason why some fonts are not loaded properly with their respective widths ?