From 3a0bdcdeb51ffc0bd2868826029bd30d6ac00af0 Mon Sep 17 00:00:00 2001 From: xhayper Date: Sun, 19 Nov 2023 12:03:09 +0700 Subject: [PATCH] feat: properly support supportedplatform and update dependencies --- package.json | 4 ++-- src/structures/ClientUser.ts | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 3cda6c7..87357cf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@xhayper/discord-rpc", - "version": "1.0.25", + "version": "1.1.0", "description": "a fork of discordjs/RPC", "main": "dist/index.js", "author": "xhayper", @@ -24,7 +24,7 @@ "prepack": "pnpm run build" }, "dependencies": { - "axios": "^1.6.1", + "axios": "^1.6.2", "ws": "^8.14.2" }, "devDependencies": { diff --git a/src/structures/ClientUser.ts b/src/structures/ClientUser.ts index 1afd48c..f0a85a3 100644 --- a/src/structures/ClientUser.ts +++ b/src/structures/ClientUser.ts @@ -6,6 +6,12 @@ import { Channel } from "./Channel"; import { Guild } from "./Guild"; import { User } from "./User"; +export enum ActivitySupportedPlatform { + IOS = "ios", + ANDROID = "android", + WEB = "web" +} + export enum ActivityPartyPrivacy { PRIVATE = 0, PUBLIC = 1 @@ -62,10 +68,7 @@ export type SetActivity = { spectateSecret?: string; instance?: boolean; buttons?: Array; - /** - * Max of 3 array elements, each string should be 1-32 characters long - */ - supportedPlatforms?: string[]; + supportedPlatforms?: (ActivitySupportedPlatform | `${ActivitySupportedPlatform}`)[]; /** * Default: ActivityTypes.PLAYING */