擅长:python、mysql、java
<p>Idk如果这是您正在寻找的,但是有一种方法可以使冷却仅在代码正确解析后激活:</p>
<pre><code>@bot.command(cooldown_after_parsing=True)
@commands.cooldown(rate, per, type=<BucketType.default: 0>)
</code></pre>
<p>您可以找到commands.cooldown<a href="https://discordpy.readthedocs.io/en/latest/ext/commands/api.html?highlight=cooldown#discord.ext.commands.cooldown" rel="nofollow noreferrer">here</a>的文档</p>
<p>以及解析<a href="https://discordpy.readthedocs.io/en/latest/ext/commands/api.html?highlight=cooldown#discord.ext.commands.Command.cooldown_after_parsing" rel="nofollow noreferrer">here</a>后冷却的文档</p>