![](/img/trans.png)
[英]bot.get_channel() occasionally returning none in discord.py,
[英]Get the channel of the Bot? Discord.py
我想知道機器人在哪個不和諧語音頻道中。 我只找到了一種知道用戶使用哪個語音通道的方法:
@client.command()
async def write(ctx):
channel = ctx.message.author.voice.channel
print(channel)
謝謝你的幫助!
從API它位於VoiceClient
:
@client.command()
async def write(ctx):
channel = ctx.voice_client.channel
print(channel)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.