()
| 83 | } |
| 84 | |
| 85 | async isAuthed(): Promise<boolean> { |
| 86 | try { |
| 87 | const response = await this.get("/users/@self"); |
| 88 | const user = fromJson(GetUserResponseSchema, response); |
| 89 | return user.user?.id !== ""; |
| 90 | } catch { |
| 91 | return false; |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | async refresh() { |
| 96 | if (this.refreshPromise) { |