Interface Usernote

A single usernote on a user

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

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

username: string

The name of the user this note is attached to

Generated using TypeDoc