本文介紹了Discord.py Bot 重命名 VoiceChannel 有時只能工作的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!
問題描述
我有一個用 discord.py 編寫的不和諧機(jī)器人,想重命名一個語音頻道.它有時有效,但有時無效.而且我沒有收到任何錯誤.
I have a discord bot written in discord.py and wanna rename a voice channel. It sometimes works but sometimes it doesn't. And I get no error.
代碼如下:
@client.event
async def on_message(message):
if "s!close" in message.content:
voice_channel = client.get_channel(711953093335449632)
await voice_channel.edit(name="support-closed")
推薦答案
頻道最近受到了不和諧的限速,以防止向 API 發(fā)送垃圾郵件并降低服務(wù)器性能.
Channels have recently been rate-limited in discord to prevent spamming the API and degrading server performance.
這篇關(guān)于Discord.py Bot 重命名 VoiceChannel 有時只能工作的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!