The following commands are available:
/ping: replies with "Pong!"/verify: replies with generated ROBLOX OAuth 2.0 link./whois: sends a GET request to Roblox’s API for the mentioned user and replies with their profile information./verifylog: sets the server's verify log channel in the database.
-
Install Node.js. Instructions on how to install Node on your system: Downloading and Installing Node.js and npm
-
Create a
.envfile inside the project's folder, and have it contain the following:SUPABASE_URL=supabase_url SUPABASE_KEY=supabase_api_key DISCORD_TOKEN=discord_token DISCORD_CLIENT_ID=discord_client_id ROBLOX_CLIENT_ID=roblox_client_id ROBLOX_API_KEY=roblox_api_key BASE_URL=https://example.com -
Create a Discord application on the Discord Developer Portal.
-
Create an OAuth 2.0 App on ROBLOX with the
openidscope. Please ensure one of the Redirect URLs matches the BASE_URL in the .env file, with /redirect added at the end (e.x.: https://example.com/redirect). -
Create an API Key on ROBLOX. No permissions are required.
-
Create a project on Supabase.
-
Obtain your
.envvariables:SUPABASE_URLandSUPABASE_KEYcan be found on the initial page of your new Supabase project. They can also be found under Project Settings.DISCORD_TOKENandDISCORD_CLIENT_IDcan be found on the page for your new Discord application. The client id will be located under the General Information tab, under Application Id. The token will be located under the Bot tab.ROBLOX_CLIENT_IDwill be located on the page for your new ROBLOX OAuth 2.0 app.ROBLOX_API_KEYwill be located on the page for your new ROBLOX API Key.BASE_URL willbe whatever your want it to be! It should be the website served by Roblox-To-Discord-Backend, either locally or hosted.
-
Install packages by running
npm iin the project's folder. -
Add your bot to your server. Instructions are here: Adding your bot to servers
-
Register the slash commands in your guild by running
npm run deploy. -
Start the bot by either using
npm start,npm run dev, or by using Docker Compose (if you have Docker Desktop installed!).
The bot comes with a few different scripts defined in package.json:
npm run build: builds thesrc/directory todist/using the TypeScript compiler.npm start: starts the bot normally.npm run dev: starts the bot in development mode, which means incrementally re-building the bot on file update and restarting it.npm run deploy: deploys Discord commands globally.npm run undeploy: deletes all deployed Discord commands globally.npm run lint: runs ESLint for best coding practices.npm run format: runs Prettier to highlight inconsistencies in formatting.npm run format:fix: runs Prettier to fix all inconsistencies in formatting.
Please create the following tables with the following columns:
roblox_discord_links(realtime)discord_id: text (primary key)guild_id: textroblox_id: text
roblox_oauth_sessionsstate: text (primary key)discord_id: textexpires_at: timestampguild_id: text
settingsguild_id: text (primary key)verify_log_channel_id: text