Reputation: 37
import discord
import random
client = discord.Client()
async def joinVoiceChannel():
channel = client.get_channel('Id')
voice = client.join_voice_channel(channel)
print('Bot should joined the Channel')
@client.event
async def on_ready():
#info
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('------')
await joinVoiceChannel()
client.run('token')
I dont know why it doesnt work , please help, I have looked at things but nothing seems to work. I have searched everything Thank you
Upvotes: 2
Views: 3039
Reputation: 3424
import discord
import random
client = discord.Client()
@Client.event
async def on_ready():
#info
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('------')
channel = Client.get_channel('id')
await Client.join_voice_channel(channel)
print('Bot should joined the Channel')
client.run('token')
Also ensure that you have PyNaCl installed, can install it from your command line by copying and pasting py -m pip install PyNaCl
Upvotes: 4