Discord.py Bot 重命名 VoiceChannel 有时只能工作
问题描述
我有一个用 discord.py 编写的不和谐机器人,想重命名一个语音频道.它有时有效,但有时无效.而且我没有收到任何错误.
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 发送垃圾邮件并降低服务器性能.
Channels have recently been rate-limited in discord to prevent spamming the API and degrading server performance.
相关文章