I want to make the bot join the voice channel that I'm in when prompted. Here's what I have:
@client.event
async def on_message(message):
if message.content.startswith('.join'):
channel = 775902254951301125
await channel.connect()
It doesn't seem to work, any tips?
I think this is what you're looking for!
@client.command(pass_context=True)
async def join(ctx):
channel = ctx.message.author.voice.voice_channel
await client.join_voice_channel(channel)
That was pulled straight from this video which was just a google search away.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With