@espcustomss/oauth

馃摉 Introduction Esp Customs OAuth

Discord OAuth actualizando todas las dependencias, totalmente funcional!! Maxima compatibilidad con TypeScript y errores corregidos

Ejemplos completos: Demo, Esp Customs

1 - 馃捇 Instalaci贸n

npm i @espcustomss/oauth

NPM

2 - Modo de uso

import { Client } from '@espcustomss/oauth';

export const auth = new Client({
id: '<your_bot_id>',
secret: '<your_bot_secret>',
redirectURI: 'http://localhost:3000/auth',
scopes: ['identify', 'guilds', 'guilds.join']
});
import { auth } from ...

const key = await auth.getAccess('<code_from_discord>');
const user = await auth.getUser(key); // { id: '...', username: '! BLD Gobi', ... }
const guilds = await auth.getGuilds(key); // Collection<{ id: '...', name: 'ESP CUSTOMS', ... }>

Generated using TypeDoc