You can very easily get started with disco-oauth by simply installing it using any of your preferred NodeJS package managers.
npm install --save disco-oauth
yarn add disco-oauth
You can also use disco-oauth/disco-oauth instead of just disco-oauth to install the latest under-development version of the library from GitHub.
Now that the library is installed, you can use it by simply importing it to your app and creating an instance of the Client class.
const OAuthClient = require('disco-oauth');
const client = new OAuthClient('my-discord-client-id', 'my-discord-client-secret');
Normally, you would want to keep your client secret hidden from others. For this, it would be best to store it among the environment variables and access it using
You are now ready to use the library. Click here to learn more.