簡體   English   中英

獲取Bot的頻道? 不和諧.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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM