Files
discordeno/structures/presence.ts

49 lines
1.3 KiB
TypeScript

import { UserPayload } from "./user.ts";
import { ActivityPayload } from "./activity";
import { StatusType } from "../types/discord";
export type PresencePayload = Partial<{
/** The user presence is being updated for */
user: UserPayload;
/** Roles this user is in */
roles: string[];
/** Null, or the user's current activity */
game: ActivityPayload;
/** Id of the guild */
guild_id: string;
// This is a deviation from the docs, as it pretty much says `: StatusType`.
/** The updated status */
status: StatusType;
/** User's current activities */
activities: ActivityPayload[];
/** User's platform-dependent status */
client_status: ClientStatusPayload;
/** When the user used their Nitro boost on the server */
premium_since: string;
/** This users guild nickname (if one is set) */
nick: string;
}> & { id: string };
export interface ClientStatusPayload {
/** The user's status set for an active desktop (Windows, Linux, Mac) application session */
desktop?: StatusType;
/** The user's status set for an active mobile (iOS, Android) application session */
mobile?: StatusType;
/** The user's status set for an active web (browser, bot account) application session */
web?: StatusType;
}
export const createPresence = (data: unknown) => {
console.log(data)
}