From 8cffb3895c333b48490da9960b9e58f6f2477829 Mon Sep 17 00:00:00 2001 From: EGGSY Date: Thu, 27 May 2021 11:43:31 +0300 Subject: [PATCH] refactor: improve types --- @types/lanyard.d.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/@types/lanyard.d.ts b/@types/lanyard.d.ts index 43b19c2..e566372 100644 --- a/@types/lanyard.d.ts +++ b/@types/lanyard.d.ts @@ -17,11 +17,11 @@ export interface LanyardError { } export interface LanyardData { - spotify?: Spotify; - listening_to_spotify: boolean; + spotify: Spotify | null; discord_user: Discorduser; - discord_status: string; + discord_status: "online" | "dnd" | "offline" | "idle"; activities: Activity[]; + listening_to_spotify: boolean; active_on_discord_mobile: boolean; active_on_discord_desktop: boolean; } @@ -37,7 +37,7 @@ export interface Spotify { export interface Timestamps { start: number; - end: number; + end?: number; } export interface Activity { @@ -64,10 +64,13 @@ export interface Assets { export interface Timestamps { start: number; + end?: number; } export interface Emoji { name: string; + id: string; + animated: boolean; } export interface Discorduser { @@ -75,5 +78,5 @@ export interface Discorduser { public_flags: number; id: string; discriminator: string; - avatar: string; + avatar: string | null; }