how to write a bot in discord that plays a song in a voice channel whenever someone joins it python code example
Example: discordpy how to make the bot join voice channel
@client.command()
async def join(ctx):
channel = ctx.author.voice.channel
await channel.connect()
@client.command()
async def leave(ctx):
await ctx.voice_client.disconnect()