Interface UsernoteInit

Details about a newly created usernote

Hierarchy

Properties

contextPermalink?: string

Permalink to the item the note was left in response to

moderatorUsername?: string

The username of the moderator who left the note, defaulting to the app user

noteType?: string

The key of the note type of this note. To get information about corresponding note type (its label text and color information), fetch the subreddit's configuration with getConfig and then pass this value to SubredditConfig.getNoteType.

Example

Get the color and text of a note type from the key:

const toolbox = new ToolboxClient(reddit);
const subreddit = 'mildlyinteresting';

// Acquire a note somehow
const usernotes = toolbox.getUsernotes(subreddit);
const note = usernotes.get('eritbh')[0];

// Look up information about the type of this note
const subConfig = toolbox.getConfig(subreddit);
const {color, text} = subConfig.getNoteType(note.noteType);
text: string

The text of the note

timestamp?: Date

The date and time the note was left, defaulting to the current time

username: string

The name of the user this note is attached to

Generated using TypeDoc