
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (38)
-
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 (...) -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)
Sur d’autres sites (2199)
-
No audio from discord bot. discord.py/ffmpeg
22 juillet 2021, par Superior125I'm creating a simple music bot and I cant figure out why there is no audio from the bot. I've tried kicking and rejoining, changing code and more. I just cant figure this out. There is no errors from the command line and the bot has a little green circle around it as if there was audio from it. However it goes away if you rejoin the VC.


Here is the code :


import discord
from discord.utils import get
from discord.ext import commands
from discord import FFmpegPCMAudio
from discord.voice_client import VoiceClient

import youtube_dl
import os

TOKEN = "Token Here"
bot = commands.Bot(command_prefix='s')
intents = discord.Intents.default()
intents.members = True
client = commands.Bot(command_prefix=',', intents = intents)

@bot.event
async def on_ready():
 channel = discord.utils.get(bot.get_all_channels(), id=794444804607574026)
 await channel.connect()
 
 
@bot.command(name='play')
async def play(ctx, url):
 await message.content.startswith('play')
 player = await voice_client.create_ytdl_player(url)
 player = await voice.create_ytdl_player("https://youtu.be/K4DyBUG242c")
 player = await vc.create_ytdl_player()
 player.start()

bot.run(TOKEN) 



If you want to, feel free to improve it. I got this code from a YouTube tutorial so I don't completely understand the audio part.


-
Discord.py bot joins voice channel but when using voicechannel.play i get error:Command raised an exception : ClientException : Not connected to voice
25 mai 2023, par AudibleDruidSo i've managed to get my discord bot to join a voice channel but when i use the play command it gives me an error that its not conencted to voice
Command raised an exception: ClientException: Not connected to voice.


Here is my code :


import discord
import random
import glob
from discord.ext import commands

##discord intents 
intents = discord.Intents()
intents.members = True
intents.messages = True
intents.guilds = True
intents.voice_states = True



connect the bot to a voice channel :



##called when user wants bot to join voice channel
@bot.command(name ='join', help = 'Make the bot join a voice channel')
async def join(context):
 
 botVoice = context.message.guild.voice_client
 if context.guild.voice_client:
 botvoicechannel = context.message.guild.voice_client.channel
 else:
 botvoicechannel = None
 authorVoice = context.author.voice
 if context.author.voice:
 authorvoicechannel = context.author.voice.channel
 else:
 authorvoicechannel = None
 
 ##await context.reply('bot voice channel: {}\n\nbot voice:\n{}\n\nauthor voice channel: {}\n\nauthor voice voice:\n{}\n\n'.format(botvoicechannel, botVoice, authorvoicechannel, authorVoice))
 
 if not authorVoice and not botVoice:
 await context.reply('Connect to a voice channel first.')
 return
 elif authorVoice and not botVoice:
 await context.reply('Connecting to {}'.format(authorvoicechannel))
 await authorvoicechannel.connect()
 return
 elif not authorVoice and botVoice:
 await context.reply("You aren't in a channel, I'm in {}".format(botvoicechannel))
 return
 elif authorVoice and botVoice:
 if (botvoicechannel == authorvoicechannel):
 await context.reply("I'm already in here.")
 return
 else:
 await context.reply('Moving to you!')
 await botVoice.move_to(authorvoicechannel)
 return
 return



and have it play a url :


@bot.command(name ='play', help = 'Make the bot play a url')
async def play(context, url):
 botVoice = context.message.guild.voice_client
 audioSource = discord.FFmpegPCMAudio(url, executable="ffmpeg")
 botVoice.play(audioSource, after = None)



the code works and the bot joins the voice channel. i see it in the voice channel with me, however i get an error when it gets to
botVoice.play(audioSource, after = None)


the error message is :

error: Command raised an exception: ClientException: Not connected to voice.


i changed
botVoice = context.message.guild.voice_client
frombotVoice = context.guild.voice_client
but that didnt seem to change anything. not sure what to try next. It seems like it wants to play the url the bot just doesnt realize its in the voice channel with me.

maybe a related error. if i kill my python script the bot remains in the channel even though its not running. then when i start it up and do the !join command it says its joining even though its already in the channel with me. its weird because on the join command it checks to see if its already in a voice channel so it should know that its in there with me. idk what to try next. thanks for any suggestions. i only posted relevant code. let me know if you think im missing something else.


thanks for the help


-
Small discord bot with a set of working music commands, about 6 days ago the play function completely stopped functioning (more below)
24 février 2021, par TheColoradoKidIt is a small discord python bot for my server with various features, which had included music commands until they stopped out of the blue without showing any error for the problem.
It uses FFMpeg, and youtubeDl along with pytube to gather the song and store it locally to play it, I have pip updated all of these and they are definitely on the current versions as I have made sure of this online.
Any help or insight anyone could provide would be greatly appreciated. I'm sorry if the code is convoluted in the way it's written I'm still pretty new to coding and this is one of my first proper larger projects.


If you need any information I'm happy to give what I can to help.


Here is the code for the play command :


@client.command()
async def play(ctx, *args):
 global queu
 #global autom
 if not args:
 voice = get(client.voice_clients, guild=ctx.guild)
 if not voice.is_playing():
 server = ctx.message.guild
 voice_channel = server.voice_client
 if queu:
 async with ctx.typing():
 player = await YTDLSource.from_url(queu[0], loop=client.loop)
 voice_channel.play(player, after=lambda e: print('Player error: %s' % e) if e else None)

 await ctx.send('**Now playing:** {}'.format(player.title))
 del(queu[0])
 # while autom == True:
 # try:
 # a = client.get_command('auto')
 # await ctx.invoke(a)
 # except:
 # print('')
 elif not queu:
 await ctx.send("You can't play if there isn't anything in the queue\nIf auto mode was on it has now been disabled, to use it gain please add to the queue and run ``;auto on``")
 autom = False
 if args:
 global gueu
 search_keywords = ""
 print(args)
 for word in args:
 search_keywords += word
 search_keywords += '+'
 link = "https://www.youtube.com/results?search_query="
 link += search_keywords
 #print(link)
 html = urllib.request.urlopen(link)
 video_ids = re.findall(r"watch\?v=(\S{11})", html.read().decode())
 url = ("https://www.youtube.com/watch?v=" + video_ids[0])
 #print(url)
 queu.append(url)
 #print(queu)
 await ctx.send("``{}`` added to queue!\n If the song doesn't start please either let the current song end and run ``;play``/``;next`` again or run ``;next`` to play now".format(url))
 try:
 p = client.get_command('play')
 await ctx.invoke(p)
 except:
 print('failed')