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?
.connect()
) on it, as if it was some kind of object related to the discord.py library. You probably forgot to call some function from the library with this number. First thing I recommend would be to check the documentation for an example.@client.event async def on_message(message): if message.content.startswith('.join'): channel = author.voice.channel await channel.connect()
Now it tells me that 'author' isn't defined. How would I go about defining it? (Sorry I'm new to programming)message.author.voice.channel
instead 🤗