moderator-toolbox-nxg-for-reddit / modules/removalreasons/schema
modules/removalreasons/schema¶
Functions¶
isDrawerDisplayMode()¶
isDrawerDisplayMode(
displayMode):boolean
Defined in: extension/data/modules/removalreasons/schema.ts:15
Returns true when the given display mode string selects the drawer variant.
Parameters¶
displayMode¶
string | undefined
The raw display mode string from settings.
Returns¶
boolean
Interfaces¶
RemovalReason¶
Defined in: extension/data/modules/removalreasons/schema.ts:86
A single configured removal reason.
Properties¶
default_note?¶
optionaldefault_note?:string
Defined in: extension/data/modules/removalreasons/schema.ts:115
Default note text to pre-fill when this reason is selected.
default_note_type?¶
optionaldefault_note_type?:string
Defined in: extension/data/modules/removalreasons/schema.ts:117
Key of the usernote type (UserNoteColor.key) to pre-select.
editable?¶
optionaleditable?:boolean
Defined in: extension/data/modules/removalreasons/schema.ts:113
When true, the moderator may edit this reason’s text before sending.
flairCSS¶
flairCSS:
string
Defined in: extension/data/modules/removalreasons/schema.ts:110
flairTemplateID¶
flairTemplateID:
string
Defined in: extension/data/modules/removalreasons/schema.ts:111
flairText¶
flairText:
string
Defined in: extension/data/modules/removalreasons/schema.ts:109
id?¶
optionalid?:string
Defined in: extension/data/modules/removalreasons/schema.ts:91
Stable identifier (schema v2+), assigned by ensureStableIds and stripped
from the classic v1 mirror. Optional because runtime data may predate it.
removeComments?¶
optionalremoveComments?:boolean
Defined in: extension/data/modules/removalreasons/schema.ts:108
Tri-state comment applicability: true always shows the reason for
comments, absent defers to the mod’s “enable removal reasons for
comments” setting, and explicit false (written by 6.x saves, never by
the NXG editor) always hides it.
removePosts?¶
optionalremovePosts?:boolean
Defined in: extension/data/modules/removalreasons/schema.ts:101
When false, this reason is hidden for posts.
text¶
text:
string
Defined in: extension/data/modules/removalreasons/schema.ts:98
Markdown body of the removal message. May contain substitution tokens
({subreddit}, …) and interactive fill-in tokens ({input: ...},
{textarea: ...}, and a {choice} block whose options are the markdown
list below the marker).
title¶
title:
string
Defined in: extension/data/modules/removalreasons/schema.ts:99
RemovalReasonsConfig¶
Defined in: extension/data/modules/removalreasons/schema.ts:23
The removal-reasons configuration block stored in the subreddit’s toolbox wiki config.
All fields except reasons are optional because older configs may omit them.
Properties¶
autoArchive?¶
optionalautoArchive?:boolean
Defined in: extension/data/modules/removalreasons/schema.ts:56
Whether modmail threads are auto-archived after sending by default.
editableReasonsEnabled?¶
optionaleditableReasonsEnabled?:boolean
Defined in: extension/data/modules/removalreasons/schema.ts:60
When true, moderators may edit reason text before sending.
getfrom?¶
optionalgetfrom?:string
Defined in: extension/data/modules/removalreasons/schema.ts:34
Name of another subreddit whose removal reasons to use instead.
Resolved recursively by getRemovalReasons.
header?¶
optionalheader?:string
Defined in: extension/data/modules/removalreasons/schema.ts:27
Markdown prepended to every removal message.
logreason?¶
optionallogreason?:string
Defined in: extension/data/modules/removalreasons/schema.ts:42
Default reason text pre-filled in the log post, supports token substitution.
logsub?¶
optionallogsub?:string
Defined in: extension/data/modules/removalreasons/schema.ts:38
Subreddit to post the removal log to.
logtitle?¶
optionallogtitle?:string
Defined in: extension/data/modules/removalreasons/schema.ts:40
Title template for the removal log post, supports token substitution.
pmsubject?¶
optionalpmsubject?:string
Defined in: extension/data/modules/removalreasons/schema.ts:36
Subject line template for removal PMs, supports token substitution.
reasons¶
reasons:
RemovalReason[]
Defined in: extension/data/modules/removalreasons/schema.ts:25
The list of configured removal reasons.
removalOption?¶
optionalremovalOption?:string
Defined in: extension/data/modules/removalreasons/schema.ts:44
How the removal option is presented: 'suggest', 'force', or 'leave'.
suggestedReasons?¶
optionalsuggestedReasons?:SuggestedReasonMapping[]
Defined in: extension/data/modules/removalreasons/schema.ts:66
Mappings from a report reason to removal reason(s), so a matching report
pre-selects (and optionally one-click applies) those reasons in the queue.
NXG-only; stripped from the legacy v1 mirror in encodeClassicConfig.
typeAsSub?¶
optionaltypeAsSub?:boolean
Defined in: extension/data/modules/removalreasons/schema.ts:54
Whether the removal message is sent via modmail as the subreddit by default.
typeCommentAsSubreddit?¶
optionaltypeCommentAsSubreddit?:boolean
Defined in: extension/data/modules/removalreasons/schema.ts:52
Whether the reply is sent as the subreddit by default.
typeLockComment?¶
optionaltypeLockComment?:boolean
Defined in: extension/data/modules/removalreasons/schema.ts:50
Whether the reply locks the removed comment by default.
typeLockThread?¶
optionaltypeLockThread?:boolean
Defined in: extension/data/modules/removalreasons/schema.ts:58
Whether the target thread is locked after removal by default.
typeReply?¶
optionaltypeReply?:string
Defined in: extension/data/modules/removalreasons/schema.ts:46
Default reply type: 'reply', 'pm', 'both', etc.
typeStickied?¶
optionaltypeStickied?:boolean
Defined in: extension/data/modules/removalreasons/schema.ts:48
Whether the reply is stickied by default.
RemovalReasonsData¶
Defined in: extension/data/modules/removalreasons/schema.ts:121
Runtime context data for a thing being removed, passed to the overlay.
Properties¶
autoArchive?¶
optionalautoArchive?:boolean
Defined in: extension/data/modules/removalreasons/schema.ts:167
body¶
body:
string
Defined in: extension/data/modules/removalreasons/schema.ts:140
Rendered plain-text body.
domain¶
domain:
string
Defined in: extension/data/modules/removalreasons/schema.ts:138
editableReasonsEnabled?¶
optionaleditableReasonsEnabled?:boolean
Defined in: extension/data/modules/removalreasons/schema.ts:170
footer¶
footer:
string
Defined in: extension/data/modules/removalreasons/schema.ts:154
Footer markdown appended to the message.
fullname¶
fullname:
string
Defined in: extension/data/modules/removalreasons/schema.ts:124
Reddit fullname (e.g. t3_abc123).
header¶
header:
string
Defined in: extension/data/modules/removalreasons/schema.ts:152
Header markdown prepended to the message.
id¶
id:
string
Defined in: extension/data/modules/removalreasons/schema.ts:126
Bare base-36 id (e.g. abc123); handy for building URLs.
kind¶
kind:
string
Defined in: extension/data/modules/removalreasons/schema.ts:131
'submission' or 'comment'.
link¶
link:
string
Defined in: extension/data/modules/removalreasons/schema.ts:137
Submission link (same as url for posts; parent post link for comments).
logReason¶
logReason:
string
Defined in: extension/data/modules/removalreasons/schema.ts:150
Pre-filled log reason text.
logSub¶
logSub:
string
Defined in: extension/data/modules/removalreasons/schema.ts:156
Log subreddit name, if removal logging is configured.
logTitle¶
logTitle:
string
Defined in: extension/data/modules/removalreasons/schema.ts:158
Title template for the log post.
mod¶
mod:
string
Defined in: extension/data/modules/removalreasons/schema.ts:133
Username of the acting moderator.
raw_body¶
raw_body:
string
Defined in: extension/data/modules/removalreasons/schema.ts:142
Raw markdown body.
reasons¶
reasons:
RemovalReason[]
Defined in: extension/data/modules/removalreasons/schema.ts:169
removalOption?¶
optionalremovalOption?:string
Defined in: extension/data/modules/removalreasons/schema.ts:160
How delivery settings apply to other mods: 'suggest', 'force', or 'leave'.
subject¶
subject:
string
Defined in: extension/data/modules/removalreasons/schema.ts:148
Subject line for Modmail delivery, may contain tokens.
subreddit¶
subreddit:
string
Defined in: extension/data/modules/removalreasons/schema.ts:122
title¶
title:
string
Defined in: extension/data/modules/removalreasons/schema.ts:129
Post or comment title (empty string for comments).
typeAsSub?¶
optionaltypeAsSub?:boolean
Defined in: extension/data/modules/removalreasons/schema.ts:166
Whether to send via modmail as the subreddit.
typeCommentAsSubreddit?¶
optionaltypeCommentAsSubreddit?:boolean
Defined in: extension/data/modules/removalreasons/schema.ts:163
typeLockComment?¶
optionaltypeLockComment?:boolean
Defined in: extension/data/modules/removalreasons/schema.ts:164
typeLockThread?¶
optionaltypeLockThread?:boolean
Defined in: extension/data/modules/removalreasons/schema.ts:168
typeReply?¶
optionaltypeReply?:string
Defined in: extension/data/modules/removalreasons/schema.ts:161
typeStickied?¶
optionaltypeStickied?:boolean
Defined in: extension/data/modules/removalreasons/schema.ts:162
uri_body¶
uri_body:
string
Defined in: extension/data/modules/removalreasons/schema.ts:144
URL-encoded body.
uri_title¶
uri_title:
string
Defined in: extension/data/modules/removalreasons/schema.ts:146
URL-encoded title.
url¶
url:
string
Defined in: extension/data/modules/removalreasons/schema.ts:135
Permalink of the thing.
RemovalReasonsOverlaySettings¶
Defined in: extension/data/modules/removalreasons/schema.ts:174
Personal default delivery settings applied when the subreddit leaves options up to each moderator.
Properties¶
actionLockCommentSetting¶
actionLockCommentSetting:
boolean
Defined in: extension/data/modules/removalreasons/schema.ts:182
actionLockSetting¶
actionLockSetting:
boolean
Defined in: extension/data/modules/removalreasons/schema.ts:181
reasonAsSubSetting¶
reasonAsSubSetting:
boolean
Defined in: extension/data/modules/removalreasons/schema.ts:177
reasonAutoArchiveSetting¶
reasonAutoArchiveSetting:
boolean
Defined in: extension/data/modules/removalreasons/schema.ts:178
reasonCommentAsSubredditSetting¶
reasonCommentAsSubredditSetting:
boolean
Defined in: extension/data/modules/removalreasons/schema.ts:180
reasonStickySetting¶
reasonStickySetting:
boolean
Defined in: extension/data/modules/removalreasons/schema.ts:179
reasonTypeSetting¶
reasonTypeSetting:
string
Defined in: extension/data/modules/removalreasons/schema.ts:176
Default delivery method from the module settings selector.
SuggestedReasonMapping¶
Defined in: extension/data/modules/removalreasons/schema.ts:74
Maps a report reason to one or more removal reasons. When a queue item carries a report whose text matches pattern, the referenced reasons are pre-selected in the removal overlay.
Properties¶
id?¶
optionalid?:string
Defined in: extension/data/modules/removalreasons/schema.ts:76
Stable identifier (assigned by ensureStableIds); optional because hand-edited configs may omit it.
includeUserReports?¶
optionalincludeUserReports?:boolean
Defined in: extension/data/modules/removalreasons/schema.ts:80
When true, user reports are also matched; otherwise only mod/bot reports are considered.
pattern¶
pattern:
string
Defined in: extension/data/modules/removalreasons/schema.ts:78
The report-reason text to look for, matched as a case-insensitive substring.
reasonIds¶
reasonIds:
string[]
Defined in: extension/data/modules/removalreasons/schema.ts:82
Stable ids of the removal reasons to suggest.
Type Aliases¶
RemovalReasonsDisplayMode¶
RemovalReasonsDisplayMode =
"Drawer"|"Popup (legacy)"
Defined in: extension/data/modules/removalreasons/schema.ts:9
How the removal reasons overlay is presented to the moderator.
Variables¶
defaultLogTitle¶
constdefaultLogTitle:"Removed: {kind} by /u/{author} to /r/{subreddit}"='Removed: {kind} by /u/{author} to /r/{subreddit}'
Defined in: extension/data/modules/removalreasons/schema.ts:6
Default log-post title, supports token substitution.
defaultSubject¶
constdefaultSubject:"Your {kind} was removed from /r/{subreddit}"='Your {kind} was removed from /r/{subreddit}'
Defined in: extension/data/modules/removalreasons/schema.ts:4
Default Modmail subject line when none is configured, supports token substitution.