【发布时间】:2021-11-15 09:09:42
【问题描述】:
我想知道机器人在哪个不和谐语音频道中。我只找到了一种知道用户在哪个语音频道中的方法:
@client.command()
async def write(ctx):
channel = ctx.message.author.voice.channel
print(channel)
感谢您的帮助!
【问题讨论】:
标签: python discord discord.py bots channel
我想知道机器人在哪个不和谐语音频道中。我只找到了一种知道用户在哪个语音频道中的方法:
@client.command()
async def write(ctx):
channel = ctx.message.author.voice.channel
print(channel)
感谢您的帮助!
【问题讨论】:
标签: python discord discord.py bots channel
来自API,它位于VoiceClient:
@client.command()
async def write(ctx):
channel = ctx.voice_client.channel
print(channel)
【讨论】: