1.1.0 • Published 7 years ago
discord_oauth2_wrapper v1.1.0
var API = require('oauth2wrapper') var api = new API('client id','client secret','client redirect URI') Functions: api.User(require) to get the user and user guild informations api.redirect(response) redirect the client to the client redirect URI API.doc() documentation of the wrapper Examples: app.get('/',(req,res) =>{ api.redirect(res) }) app.get('/client redirect URI',async(req,res) =>{ var a = await api.User(req) console.log(a0)// this will return the user informations console.log(a1) // this will return the guilds of the user informations })