moderator-toolbox-nxg-for-reddit / modules/domaintagger/moduleapi
modules/domaintagger/moduleapi¶
Functions¶
incrementDomainStat()¶
incrementDomainStat(
subreddit,domain,action):Promise<void>
Defined in: extension/data/modules/domaintagger/moduleapi.ts:232
Increments the approval or removal counter for the domain tag that matches the given domain. No-ops silently if no tag matches (untagged domains are not tracked). Uses a read->mutate->write cycle with the per-subreddit save queue.
Parameters¶
subreddit¶
string
The subreddit where the mod action occurred.
domain¶
string
The domain string extracted from the post.
action¶
"approve" | "remove"
Whether the post was approved or removed.
Returns¶
Promise<void>
saveDomainTag()¶
saveDomainTag(
subreddit,domainTag):Promise<void>
Defined in: extension/data/modules/domaintagger/moduleapi.ts:188
Adds, updates, or removes a single domain tag. A tag with color: 'none' removes it.
Preserves existing approvalCount, removalCount, and note values on update.
Parameters¶
subreddit¶
string
The subreddit whose domain tags to update.
domainTag¶
The tag to add, update, or remove. approvalCount/removalCount default to 0 for new tags.
Returns¶
Promise<void>
References¶
DomainTag¶
Re-exports DomainTag