【发布时间】:2020-07-24 06:13:53
【问题描述】:
我正在尝试制作一个简单的 Discord Bot(用 Python 3 编写),它只在命令后连接和断开连接。 Connect 命令工作正常,但我的 Discconect 命令不起作用。这是包含两个命令的代码 sn-p:
async def join(message):
channel = message.message.author.voice.channel
await channel.connect()
@client.command(pass_context = True)
async def leave(message):
channel = message.message.author.voice.channel
await channel.disconnect()```
【问题讨论】:
-
您有任何错误吗?如果是这样,您应该在问题中包含错误
标签: python python-3.x discord discord.py