Skip to content

esp-customs/OAuth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📖 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', ... }>