- Installation and Configuration
- Simple module for using Discord's OAuth2 API
- Requires client ID, secret, and scopes from constructor
- Uses modified Eris's request handler with default options
- Key Methods
- tokenRequest retrieves access token with authorization code or refresh token
- revokeToken removes access token and credentials
- getUser retrieves user information with identify or email scope
- getUserGuilds shows user's guild memberships
- addMember forces user to guild with optional permissions
- generateAuthUrl creates dynamic OAuth2 URL with customizable parameters
- Debugging Features
- Error object provides detailed HTTP request and response information
- Includes stack trace for troubleshooting
- Supports both DiscordHTTPError and DiscordRESTError types