Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #play #file
ADD COMMENT
Topic
Name
3+1 =