• This function adds a new note to the calendar

    Returns

    The newly created JournalEntry that contains the note data, or null if there was an error encountered.

    Example

    const newJournal = await SimpleCalendar.api.addNote('Christmas Day','Presents!', {year: 2022, month: 11, day: 24, hour: 0, minute: 0, seconds: 0}, {year: 2022, month: 11, day: 24, hour: 0, minute: 0, seconds: 0}, true, SimpleCalendar.api.NoteRepeat.Yearly, ['Holiday']);
    // Will create a new note on Christmas day of 2022 that lasts all day and repeats yearly.

    Parameters

    • title: string

      The title of the new note

    • content: string

      The contents of the new note

    • startDate: DateTimeParts

      The date and time the note starts, if any date or time properties are missing the current date/time values will be used.

    • endDate: DateTimeParts

      The date and time the note ends (can be the same as the start date), if any date or time properties are missing the current date/time values will be used.

    • allDay: boolean

      If the note lasts all day or if it has a specific time duration. Whether to ignore the time portion of the start and end dates.

    • repeats: NoteRepeat = NoteRepeat.Never

      If the note repeats and how often it does

    • categories: string[] = []

      A list of note categories to assign to this note

    • calendarId: string = 'active'

      Optional parameter to specify the ID of the calendar to add the note too. If not provided the current active calendar will be used.

    • macro: null | string = null

      The ID of the macro that this note should execute when the in game time meets or exceeds the note time. Or null if no macro should be executed.

    • userVisibility: string[] = []

      Optional parameter to specify an array of user ID's who will have permission to view the note. The creator of the note will always have permission. Use ['default'] if you want all users to be able to view it.

    • remindUsers: string[] = []

      Optional parameter to provide an array of user ID's who will be reminded of the note.

    Returns Promise<StoredDocument<JournalEntry> | null>