mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
feat: Add VR client status support (#5270)
This commit is contained in:
@@ -14,6 +14,7 @@ export function transformPresence(bot: Bot, payload: Partial<DiscordPresenceUpda
|
|||||||
if (payload.client_status?.desktop) presence.desktop = payload.client_status.desktop;
|
if (payload.client_status?.desktop) presence.desktop = payload.client_status.desktop;
|
||||||
if (payload.client_status?.mobile) presence.mobile = payload.client_status.mobile;
|
if (payload.client_status?.mobile) presence.mobile = payload.client_status.mobile;
|
||||||
if (payload.client_status?.web) presence.web = payload.client_status.web;
|
if (payload.client_status?.web) presence.web = payload.client_status.web;
|
||||||
|
if (payload.client_status?.vr) presence.vr = payload.client_status.vr;
|
||||||
|
|
||||||
return callCustomizer('presence', bot, payload, presence, {
|
return callCustomizer('presence', bot, payload, presence, {
|
||||||
partial: extra?.partial ?? false,
|
partial: extra?.partial ?? false,
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ export function transformPresenceToDiscordPresence(bot: Bot, payload: PresenceUp
|
|||||||
desktop: payload.desktop,
|
desktop: payload.desktop,
|
||||||
mobile: payload.mobile,
|
mobile: payload.mobile,
|
||||||
web: payload.web,
|
web: payload.web,
|
||||||
|
vr: payload.vr,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1647,6 +1647,7 @@ export interface PresenceUpdate {
|
|||||||
desktop?: string;
|
desktop?: string;
|
||||||
mobile?: string;
|
mobile?: string;
|
||||||
web?: string;
|
web?: string;
|
||||||
|
vr?: string;
|
||||||
user: User;
|
user: User;
|
||||||
guildId: bigint;
|
guildId: bigint;
|
||||||
status: PresenceStatus;
|
status: PresenceStatus;
|
||||||
|
|||||||
@@ -846,6 +846,8 @@ export interface DiscordClientStatus {
|
|||||||
mobile?: string;
|
mobile?: string;
|
||||||
/** The user's status set for an active web (browser, bot account) application session */
|
/** The user's status set for an active web (browser, bot account) application session */
|
||||||
web?: string;
|
web?: string;
|
||||||
|
/** User's status set for an active virtual reality application session */
|
||||||
|
vr?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** https://docs.discord.com/developers/events/gateway-events#activity-object */
|
/** https://docs.discord.com/developers/events/gateway-events#activity-object */
|
||||||
|
|||||||
Reference in New Issue
Block a user