aboutsummaryrefslogtreecommitdiff
path: root/cleaners/socialmedia.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cleaners/socialmedia.ts')
-rw-r--r--cleaners/socialmedia.ts14
1 files changed, 14 insertions, 0 deletions
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
+ }
+}
+