raito.plugins.throttling.flag module

raito.plugins.throttling.flag.limiter(rate_limit, mode='user')[исходный код]

Attach a rate limit to the command handler.

This decorator sets a custom rate limit (in seconds) for a specific command handler.

Параметры:
  • rate_limit (float) – Minimum delay between invokes (in seconds)

  • mode (Literal['user', 'chat', 'bot']) – Throttling key type: „user“, „chat“, or „bot“

Результат:

Combined FlagDecorator

Тип результата:

FlagDecorator