A Discord bot that allows interaction with the VRChat API.
Warning: run the auth.js script first to get the token login from VRChat
- Authentication: Manage authentication using a code system.
- Slash Commands:
/grade
: Get your VRChat rank.
Package Name | Version |
---|---|
@discordjs/builders |
^1.6.5 |
discord.js |
^14.13.0 |
undici |
^0.0.2 |
- Clone this repository.
- Install the dependencies with
npm install
. - Run the bot with
node auth.js
. - Write your ID and Password
- Rerun the
auth.js
to get asked for 2FA - Add the 2FA code on the terminal
- The
config.json
file is generated and can be used !
Note: Do not work on the auth.js file, create a new file like bot.js to use the API
When you run the script with the auth.js
command, the console will ask for your username and password. Fill them out, and then the script will generate a config.json
in which it will store the information.
Once the script stops and the information is written to the config, run the script a second time to activate 2FA this time. When the script asks you for the 2FA code, enter it, and it will finish generating what you need.
This is what the config file will look like:
{
"username": "username",
"password": "password",
"auth": "authcookie_xxxxxxxxx",
"codetype": "emailotp",
"code": "xxxxxxx",
"twofa": "xxxxxxxxxxxxxxxxxxxxx"
}
You can delete the username
and password
fields and keep the rest. This file will authenticate you on the API for each of your VRChat projects!
Add this code on your .js file: const config = require('./config.json');
to get your auth config
Enjoy coding !
This project is under the MIT license.