moderator-toolbox-nxg-for-reddit / modules/macros/schema

modules/macros/schema

Interfaces

MacroConfig

Defined in: extension/data/modules/macros/schema.ts:45

A single macro entry as stored in the subreddit’s toolbox wiki config.

Properties

approve?

optional approve?: boolean

Defined in: extension/data/modules/macros/schema.ts:55

archivemodmail?

optional archivemodmail?: boolean

Defined in: extension/data/modules/macros/schema.ts:70

ban?

optional ban?: boolean

Defined in: extension/data/modules/macros/schema.ts:57

contextcomment?

optional contextcomment?: boolean

Defined in: extension/data/modules/macros/schema.ts:79

Show this macro in comment contexts; defaults to true when absent.

contextmodmail?

optional contextmodmail?: boolean

Defined in: extension/data/modules/macros/schema.ts:81

Show this macro in modmail contexts; defaults to true when absent.

contextpost?

optional contextpost?: boolean

Defined in: extension/data/modules/macros/schema.ts:77

Show this macro in post contexts; defaults to true when absent.

distinguish?

optional distinguish?: boolean

Defined in: extension/data/modules/macros/schema.ts:73

Distinguish the macro reply as a moderator comment.

highlightmodmail?

optional highlightmodmail?: boolean

Defined in: extension/data/modules/macros/schema.ts:71

id?

optional id?: string

Defined in: extension/data/modules/macros/schema.ts:50

Stable identifier (schema v2+), assigned by ensureStableIds and stripped from the classic v1 mirror. Optional because runtime data may predate it.

lockreply?

optional lockreply?: boolean

Defined in: extension/data/modules/macros/schema.ts:67

Lock the reply posted by this macro.

lockthread?

optional lockthread?: boolean

Defined in: extension/data/modules/macros/schema.ts:65

Lock the target post or comment thread.

mute?

optional mute?: boolean

Defined in: extension/data/modules/macros/schema.ts:59

remove?

optional remove?: boolean

Defined in: extension/data/modules/macros/schema.ts:54

replyassubreddit?

optional replyassubreddit?: boolean

Defined in: extension/data/modules/macros/schema.ts:75

Post the reply as the subreddit ModTeam account via official removal message.

spam?

optional spam?: boolean

Defined in: extension/data/modules/macros/schema.ts:56

sticky?

optional sticky?: boolean

Defined in: extension/data/modules/macros/schema.ts:69

Sticky the macro reply (only effective on top-level comments).

text

text: string

Defined in: extension/data/modules/macros/schema.ts:52

The macro reply text (supports markdown and token replacement).

title?

optional title?: string

Defined in: extension/data/modules/macros/schema.ts:53

unban?

optional unban?: boolean

Defined in: extension/data/modules/macros/schema.ts:58

userflair?

optional userflair?: string

Defined in: extension/data/modules/macros/schema.ts:61

Flair template ID to apply to the post/comment author.

userflairtext?

optional userflairtext?: string

Defined in: extension/data/modules/macros/schema.ts:63

Display text for the flair template.


ThingInfo

Defined in: extension/data/modules/macros/schema.ts:7

Normalized metadata about a Reddit post or comment, used as the token-replacement context when rendering macro text before posting.

Indexable

[key: string]: unknown

Properties

approved_by

approved_by: string

Defined in: extension/data/modules/macros/schema.ts:22

author

author: string

Defined in: extension/data/modules/macros/schema.ts:10

banned_by

banned_by: string | null

Defined in: extension/data/modules/macros/schema.ts:30

body

body: string

Defined in: extension/data/modules/macros/schema.ts:18

domain

domain: string

Defined in: extension/data/modules/macros/schema.ts:13

fullname

fullname: string

Defined in: extension/data/modules/macros/schema.ts:17

The fullname (e.g. t1_abc123) of the target post or comment.

ham

ham: string | boolean

Defined in: extension/data/modules/macros/schema.ts:32

id

id: string

Defined in: extension/data/modules/macros/schema.ts:15

The bare base-36 id (e.g. abc123) of the target post or comment; handy for building URLs.

kind

kind: string

Defined in: extension/data/modules/macros/schema.ts:27

The Reddit thing type: 'link', 'comment', etc.

mod

mod: string

Defined in: extension/data/modules/macros/schema.ts:40

Username of the acting moderator.

raw_body

raw_body: string

Defined in: extension/data/modules/macros/schema.ts:19

rules

rules: string

Defined in: extension/data/modules/macros/schema.ts:34

URL of the subreddit’s rules page.

spam

spam: string | boolean

Defined in: extension/data/modules/macros/schema.ts:31

subreddit

subreddit: string

Defined in: extension/data/modules/macros/schema.ts:8

title

title: string

Defined in: extension/data/modules/macros/schema.ts:23

uri_body

uri_body: string

Defined in: extension/data/modules/macros/schema.ts:21

URL-encoded version of the body text.

uri_title

uri_title: string

Defined in: extension/data/modules/macros/schema.ts:25

URL-encoded version of the title.

url

url: string

Defined in: extension/data/modules/macros/schema.ts:12

user

user: string

Defined in: extension/data/modules/macros/schema.ts:9

wiki

wiki: string

Defined in: extension/data/modules/macros/schema.ts:38

URL of the subreddit’s wiki index.