Skip to content

Show a rate limit error if the next retry is delayed by more than X minutes #3031

@pgcoordinates

Description

@pgcoordinates

Summary

Certain rate limits, such as channel name edits, have very long cooldowns of up to 10 minutes. It is better to show a rate limit error instead of silently delaying the task for such a long time.

What is the feature request for?

The core library

The Problem

Currently, tasks wait for the rate limit to expire before retrying. This works well because most rate limits expire within a few seconds or, at most, one minute.

However, some rate limits, like channel name edits, allow only two actions within ten minutes. This creates confusion when a bot attempts to edit a channel but nothing happens and no error is shown. In most cases, users expect the change to occur quickly or to receive a rate limit error. Delaying the task for over five minutes due to a rate limit causes significant confusion.

This issue was raised over two years ago here: #2050

The Ideal Solution

If the next retry time exceeds a defined threshold, such as 3 minutes, the task should fail immediately and raise a rate limit error instead of being delayed.

This would make the behaviour more predictable and transparent. For short rate limits, the current retry mechanism can remain unchanged. For long rate limits, such as channel edits with a 10 minute cooldown, the user would immediately know that the action was blocked by a rate limit rather than assuming the bot is malfunctioning.

The Current Solution

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature requesthelp wantedExtra attention is neededhold: discussionThis pull request needs to be further discussed between maintainersin-nextIssues that are / will be handled in pycord-next.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions