A voir également:
- Discord.ext.commands.errors.commandinvokeerror: command raised an exception: clientexception: ffmpeg was not found.
- Sfc scannow command - Guide
- Vb6fr.dll could not be found - Forum Windows
- Alert hard drive not found ✓ - Forum Windows
- Input signal not found - Forum Matériel & Système
- Boot device not found hp que faire ✓ - Forum Windows 10
import discord
from discord.ext import commands
bot = commands.Bot(command_prefix='!')
@bot.event
async def on_ready():
print('le bot est prêt')
@bot.command(name='play_song')
async def play(ctx):
if not ctx.message.author.voice:
await ctx.send("{} is not connected to a voice channel".format(ctx.message.author.name))
return
else:
channel = ctx.message.author.voice.channel
await channel.connect()
server = ctx.message.guild
voice_channel = server.voice_client
async with ctx.typing():
filename = "musique.mp3"
voice_channel.play(discord.FFmpegPCMAudio(executable="ffmpeg.exe", source=filename))
await ctx.send('**Now playing:** {}'.format(filename))
bot.run('')
je pense que c'est dans l'une des dernier ligne decode ou il y a merquer "ffmpeg.exe" mais j'ai le module d'installer est j'ai cherché ce fichier dans mon ordi mais je ne l'ai pas trouver
réinstalles le, sur cette ligne je mettrais le chemin complet comme
PS : Pour la mise en forme des sources, au dessus de la zone d'édition de tes messages, il y a des icônes pour l'enrichissement du texte. Celle qui a cet aspect permet d'appliquer au code, suivant une liste de valeurs, le format correspondant à sa nature (html, Php, C, Python, Shell, ...).
Un petit tuto là : https://codes-sources.commentcamarche.net/faq/11288-les-balises-de-code
mais je fait comment pour installer le .exe je ne le trouve pas sur internet ni dans les fichier du module
va sur : https://www.gyan.dev/ffmpeg/builds/ tu télécharges ffmpeg-2022-06-22-git-fed07efcde-essentials_build.7z
tu dézippes dans un répertoire le .exe est dans bin