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')
我不知道为什么它不起作用,请帮忙,我看了一下但似乎什么都没有用。我搜索了一切 谢谢
答案 0 :(得分:4)
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')
还要确保安装了PyNaCl,可以通过复制和粘贴py -m pip install PyNaCl