Skip to content

Usage limits

A usage limit caps how many times each member can use a command within a time window: "3 uses per hour", "1 use per 10 minutes", "20 uses per day". It's the answer to command spam: /economy rob every few seconds, /fun images flooding a channel, a moderator mass-warning by mistake.

How it counts

  • Per member: each member has their own counter. Lina reaching the limit doesn't block Sam.
  • Per command: the limit of economy rob doesn't touch economy work.
  • Sliding window: with "3 uses per 1 hour", iHorizon looks at the last hour before each use. A use made at 14:05 stops counting at 15:05: no fixed reset time to wait for.
  • Who is never limited: the Discord server owner and the server's iHorizon owners. Everyone else is, Administrators and Perm 9 included.

When the limit is reached, iHorizon answers with the remaining time:

/economy rob
iHorizonAPPToday at 21:20
You have reached the limit for this command. Try again in 42 minute(s) 10 second(s).

/commandlimit action [command] [count] [window-time]

Needs the Administrator permission (or a command rule on commandlimit). Also available as a prefix command, for top-level commands only: +commandlimit set fun 5 1m. For a subcommand like economy rob, use the slash command.

Option What it does
action Set, Reset or List
command The command, with autocomplete: economy rob, mod warn, fun…
count How many uses are allowed in the window (a whole number above 0)
window-time The window: 30s, 10m, 1h, 1d, 1w…

Set a limit

/commandlimit action: Set command: economy rob count: 3 window-time: 1h
iHorizonAPPToday at 21:22
The rate limit for economy rob has been set to 3 use(s) per 1 hour(s).

Setting a limit again replaces the previous one.

A limit on a whole command

Like command rules, a limit on a top-level command (fun, economy) applies to every subcommand that has no limit of its own. Each subcommand keeps its own counter: with fun = 5 per minute, a member can use fun interaction kiss 5 times and fun animals cat 5 times in the same minute.

Reset a limit

Reset with command removes its limit: "The rate limit for economy rob has been reset." If there was none: "No rate limit is configured for economy rob."

List the limits

/commandlimit action: List
iHorizonAPPToday at 21:24
Configured command rate limits
- economy rob: 3 use(s) per 1 hour(s)
- fun: 5 use(s) per 1 minute(s)
- mod warn: 10 use(s) per 10 minute(s)

Limits, rules and cooldowns together

The three never get in each other's way, they stack:

Command rule Usage limit Built-in cooldown
Answers Who can run it How often each member can Fixed wait between two uses
Set by You (/perm command) You (/commandlimit) The bot (some commands only)
Owners exempt Yes Yes No

The order is: rule, then limit, then Discord permission, then cooldown. A use counts toward the limit as soon as it passes the limit check, even if a later check (a missing Discord permission, a wrong argument) then stops the command.

Limits for staff commands too

Limits aren't only for members. mod warn at 10 per 10 minutes, or mod clear at 5 per minute, protects you from a compromised moderator account or an over-zealous new helper, without slowing down normal moderation.

Dashboard actions count too

Actions launched from the dashboard count toward the same limits as the command they mirror. The dashboard module Permissions also edits the limits (1 to 10,000 uses, windows up to 365 days).

Next