From a23103ec24128f2e24b93ad101ade6dfdd4758c3 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Sat, 13 Feb 2021 13:56:19 -0600 Subject: Basic profile stats --- cleaners/socialmedia.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 cleaners/socialmedia.ts (limited to 'cleaners/socialmedia.ts') diff --git a/cleaners/socialmedia.ts b/cleaners/socialmedia.ts new file mode 100644 index 0000000..c1f9551 --- /dev/null +++ b/cleaners/socialmedia.ts @@ -0,0 +1,14 @@ +import { HypixelPlayerSocialMedia } from "../hypixelApi"; + +export interface CleanSocialMedia { + discord: string | null + forums: string | null +} + +export function parseSocialMedia(socialMedia: HypixelPlayerSocialMedia): CleanSocialMedia { + return { + discord: socialMedia?.links?.DISCORD || null, + forums: socialMedia?.links?.HYPIXEL || null + } +} + -- cgit