src/index.js
/**
	 * Retrieve the Discord user profile
	 * @param {string} accessToken - access token parsed from the HTTP request
	 * @param {Function} done
	 * TODO: support additional scopes provided to the strategy (e.g. `connections` and `guilds`)
	 */
Retrieve the Discord user profile
@param {string} accessToken - access token parsed from the HTTP request
@param {Function} done
TODO: support additional scopes provided to the strategy
Retrieve the Discord user profile @param { string } accessToken - access token parsed from the HTTP request @param { Function } done TODO : support additional scopes provided to the strategy
userProfile(accessToken, done) {
		this._oauth2.get(this._profileURL, accessToken, (error, body) => {
			if (error) return done(new InternalOAuthError('Failed to fetch user profile', error));
			try {
				const json = JSON.parse(body);
				const profile = {
					provider: 'discord',
					...json,
					_raw: body,
				};
				done(null, profile);
			} catch (err) {
				done(err);
			}
		});
	}
userProfile ( accessToken , done ) { this . _oauth2 . get ( this . _profileURL , accessToken , ( error , body ) => { if ( error ) return done ( new InternalOAuthError ( 'Failed to fetch user profile' , error ) ) ; try { const json = JSON . parse ( body ) ; const profile = { provider : 'discord' , ... json , _raw : body , } ; done ( null , profile ) ; } catch ( err ) { done ( err ) ; } } ) ; }
Retrieve the Discord user profile
 @param {string} accessToken - access token parsed from the HTTP request
 @param {Function} done
 TODO: support additional scopes provided to the strategy (e.g.
Retrieve the Discord user profile @param { string } accessToken - access token parsed from the HTTP request @param { Function } done TODO : support additional scopes provided to the strategy ( e . g .