moderator-toolbox-nxg-for-reddit / modules/removalreasons/moduleapi

modules/removalreasons/moduleapi

Functions

getRemovalReasons()

getRemovalReasons(subreddit, allowNonModerated?): Promise<false | RemovalReasonsConfig>

Defined in: extension/data/modules/removalreasons/moduleapi.ts:15

Recursively resolves removal reasons for a subreddit, following getfrom redirects. Returns the removalReasons config object, or false if not configured.

Parameters

subreddit

string

The bare subreddit name.

allowNonModerated?

boolean = false

Read even when the viewer doesn’t moderate the sub. A getfrom redirect can point at a different subreddit the viewer doesn’t moderate (shared removal reasons), which must still resolve; the acting sub keeps the default mod-gate.

Returns

Promise<false | RemovalReasonsConfig>


saveRemovalConfig()

saveRemovalConfig(subreddit, config, reason): void

Defined in: extension/data/modules/removalreasons/moduleapi.ts:37

Saves the full toolbox wiki config for a subreddit.

Parameters

subreddit

string

The bare subreddit name.

config

ToolboxConfig

The full toolbox config object.

reason

string

The wiki revision note.

Returns

void