【发布时间】:2020-04-12 07:15:58
【问题描述】:
我已经让机器人加入我的语音服务器,如下所示
if message.content.startswith("?join"):
channel = message.author.voice.channel
await channel.connect()
await message.channel.send('bot joined')
但我不能让机器人离开频道.. 我该如何编写代码来做到这一点? 和有什么区别
@bot.event
async def on_message(message):
if message.content.startswith('~'):
和
@bot.command()
async def ~(ctx):
【问题讨论】:
标签: python discord.py