
Recherche avancée
Médias (91)
-
Head down (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Echoplex (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Discipline (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Letting you (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
1 000 000 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
999 999 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (78)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette 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. -
Creating farms of unique websites
13 avril 2011, parMediaSPIP 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" (...)
Sur d’autres sites (11935)
-
checkasm/vf_gblur : add test for horiz_slice simd
4 juin 2019, par Ruiling Song -
Hosting music bot on heroku
2 mars 2021, par itsmaxplayzI have made a discord bot on discord.py rewrite which plays music in a voice channel. The code is as follows :


def search(query):

 with ytdl:
 try:
 requests.get(query)
 except:
 info = ytdl.extract_info(f"ytsearch:{query}", download=False)['entries'][0]
 else:
 info = ytdl.extract_info(query, download=False)
 return info, info['formats'][0]['url']

ydl_opts = {
 'format': 'bestaudio/best',
 'quiet': True,
 'postprocessors': [{
 'key': 'FFmpegExtractAudio',
 'preferredcodec': 'mp3',
 'preferredquality': '192',
 }],

}

ytdl = youtube_dl.YoutubeDL(ydl_opts)

FFMPEG_OPTS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}

@client.command(aliases=['p'])
async def play(ctx, *, url):
 channel = ctx.message.author.voice.channel
 voice = get(client.voice_clients, guild=ctx.guild)
 if voice and voice.is_connected():
 pass
 else:
 voice = await channel.connect()
 await ctx.send(f'Successfully joined `{channel}`')

 if voice.is_playing():
 await ctx.send('Already playing a song. Try using -q or -queue to queue a song 
 :thumbsup:')
 else:
 await ctx.send(f'Searching for: `{url}` :mag_right:')
 video, source = search(url)
 voice.play(FFmpegPCMAudio(source, **FFMPEG_OPTS))
 voice.is_playing()
 await ctx.send(f'Playing: :notes: `{video["title"]}` - Now!')



It works locally but when I upload the code to heroku (I use github to push the code to heroku), the bot does not come online.
These are the libraries that I imported in the code :


import discord
import json
import random
import youtube_dl
import requests
import os
from discord.ext import commands
from discord.utils import get
from discord import FFmpegPCMAudio
import ctypes
import ctypes.util



I have installed the ffmpeg buildpacks as I saw in another post on this website but the bot doesn't come online.


Contents of my requirement file :


discord.py,
discord.py[voice],
ffmpeg,
PyNaCl,
youtube_dl,
requests,
discord.py[FFmpegPCMAudio],
colorlog.


-
Music bot doesn't play livestreams anymore
31 janvier 2019, par SilvinatorMy Discord bot played YT Livestreams all the time, but it stopped working today. The only message I get (in the console) is stream. It plays normal videos, but no streams.
The question is, why it stopped working ? I did not change any code. Anyone got a idea ?client.on("message", async message => {
var args = message.content.substring(prefix.length).split(" ");
if (!message.content.startsWith(prefix)) return;
var searchString = args.slice(1).join(' ');
var url = args[1] ? args[1].replace(/<(.+)>/g, '$1') : '';
var serverQueue = queue.get(message.guild.id);
switch (args[0].toLowerCase()) {
case "play":
var voiceChannel = message.member.voiceChannel;
if (!voiceChannel) return message.channel.send(`Du willst mit mir Karaoke singen? Da ich eh nichts besseres zu tun habe. Du suchst aber den Voice Channel aus!`);
var permissions = voiceChannel.permissionsFor(message.client.user);
if (!permissions.has('CONNECT')) {
return message.channel.send('I cannot connect to your voice channel, make sure I have the proper permissions!');
}
if (!permissions.has('SPEAK')) {
return message.channel.send('I cannot speak in this voice channel, make sure I have the proper permissions!');
}
if (url.match(/^https?:\/\/(www.youtube.com|youtube.com)\/playlist(.*)$/)) {
var playlist = await youtube.getPlaylist(url);
var videos = await playlist.getVideos();
for (const video of Object.values(videos)) {
var video2 = await youtube.getVideoByID(video.id); // eslint-disable-line no-await-in-loop
await handleVideo(video2, message, voiceChannel, true); // eslint-disable-line no-await-in-loop
}
return message.channel.send(`Ich habe wohl keine andere wahl... Ich habe **${playlist.title}** der playlist zugefügt`);
} else {
try {
var video = await youtube.getVideo(url);
} catch (error) {
try {
var videos = await youtube.searchVideos(searchString, 10);
var index = 0;
var videoIndex = 1;
var video = await youtube.getVideoByID(videos[videoIndex - 1].id);
} catch (err) {
console.error(err);
return message.channel.send('Gibt es den Song überhaupt?');
}
}
return handleVideo(video, message, voiceChannel);
}
break;
case "skip":
if (!message.member.voiceChannel) return message.channel.send('Du musst schon in den Voice Channel gehen, baka!');
if (!serverQueue) return message.channel.send('Du musst schon ein song auswählen, baka!');
serverQueue.connection.dispatcher.end('Skip command has been used!');
return undefined;
break;
case "stop":
if (!message.member.voiceChannel) return message.channel.send('Du musst schon in den Voice Channel gehen, baka!');
if (!serverQueue) return message.channel.send('Du musst schon einen Song auswählen, baka');
serverQueue.connection.dispatcher.end('Stop command has been used!');
serverQueue.songs = [];
return undefined;
break;
case "minfo":
if (!serverQueue) return message.channel.send('Ich spiele immer noch nichts!');
return message.channel.send(`ퟎ