moderator-toolbox-nxg-for-reddit / framework/rateLimitNotice
framework/rateLimitNotice¶
Functions¶
createRateLimitNotice()¶
createRateLimitNotice(): () =>
Promise<void>
Defined in: extension/data/framework/rateLimitNotice.ts:28
Watches the shared API budget while startup is pending. Startup waits on API calls (and modules would be non-functional without them), so instead of loading early we explain the delay. The notice is plain DOM with no API calls or React, since neither the React root nor the toast system exists yet. It polls rather than checking once because the budget can run out mid-startup (e.g. a 429 on the first request).
Returns¶
A cleanup function; call it once startup finishes or aborts to stop polling and remove the notice.
() => Promise<void>
rateLimitNoticeText()¶
rateLimitNoticeText(
countdown):string
Defined in: extension/data/framework/rateLimitNotice.ts:13
Builds the notice text for a spent budget.
Parameters¶
countdown¶
string | null
m:ss until reset, or null when unknown.
Returns¶
string