Answers for "discord.py play mp3 file"

2

discord.py play mp3 file

@bot.command(aliases=['paly', 'queue', 'que'])
async def play(ctx):
    guild = ctx.guild
    voice_client: discord.VoiceClient = discord.utils.get(bot.voice_clients, guild=guild)
    audio_source = discord.FFmpegPCMAudio('vuvuzela.mp3')
    if not voice_client.is_playing():
        voice_client.play(audio_source, after=None)
Posted by: Guest on September-21-2020
-2

discord.py play audio

If you want to make a serious bot try Lavalink: https://github.com/Devoxin/Lavalink.py
Posted by: Guest on July-29-2021

Python Answers by Framework

Browse Popular Code Answers by Language