()
| 1183 | } |
| 1184 | note?: string; |
| 1185 | async saveNotes(note: string) { |
| 1186 | this.note = note; |
| 1187 | await fetch(`${this.info.api}/users/@me/notes/${this.id}`, { |
| 1188 | method: "PUT", |
| 1189 | headers: this.headers, |
| 1190 | body: JSON.stringify({note}), |
| 1191 | }); |
| 1192 | } |
| 1193 | async getNotes() { |
| 1194 | try { |
| 1195 | if (this.note === undefined) { |
| 1196 | this.note = |
| 1197 | ( |
| 1198 | await ( |
| 1199 | await fetch(`${this.info.api}/users/@me/notes/${this.id}`, { |
| 1200 | method: "GET", |
| 1201 | headers: this.headers, |
| 1202 | }) |
| 1203 | ).json() |
| 1204 | ).note || ""; |
| 1205 | } |