问题
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