Discord.py Bot renaming a VoiceChannel only works sometimes

不打扰是莪最后的温柔 提交于 2020-07-10 05:15:51

问题


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.

Here's the code:

@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")

回答1:


Channels have recently been rate-limited in discord to prevent spamming the API and degrading server performance.



来源:https://stackoverflow.com/questions/62470067/discord-py-bot-renaming-a-voicechannel-only-works-sometimes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!