【发布时间】:2021-09-19 11:54:27
【问题描述】:
voice_channel = bot.get_channel('channel id')
await voice_channel.connect()
我想让机器人在给出命令时加入特定的语音频道,但上面的代码给出错误“命令引发异常:AttributeError:'NoneType'对象没有属性'connect'”。
如何让机器人加入正确的指定语音频道?
【问题讨论】:
-
get_channel 的参数应该是一个 int。你用的是字符串吗?
标签: python discord.py