Reputation: 275
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?
Upvotes: 3
Views: 2667
Reputation: 1
import discord
from discord.ext import commands
client = commands.Bot(command_prefix = '>')
@client.event
async def on_ready():
print ("Log : "+str(client.user))
ch = await client.fetch_channel("enter id voice channel")
await ch.connect()
client.run('token')
Upvotes: 0