UNPKG

tiny-essentials

Version:

Collection of small, essential scripts designed to be used across various projects. These simple utilities are crafted for speed, ease of use, and versatility.

12 lines 752 B
/** * Handles the Discord OAuth2 authentication for a user, stores user data in an in-memory cache, * and manages the user's socket connection and disconnection events. * * @param {Record<string, any>} socket - The socket object representing the user's connection. * @param {Record<string, any>} ioCache - The shared cache that stores user data and connections. * @param {string} token - The OAuth2 token used to fetch user data from Discord. * @returns {Promise<Record<string, any>>} A promise that resolves with the user data and updates the cache. * @deprecated */ export default function discord(socket: Record<string, any>, ioCache: Record<string, any>, token: string): Promise<Record<string, any>>; //# sourceMappingURL=discord.d.mts.map