discord.py how to make a play command code example
Example: 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)