Skip to content

Xandrice/vorp_whitelist

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Whitelist discord for RedM by Nolosha Roleplay for VORP

image

Requirements

Nothing.

Installation

  • Download files
  • Copy and paste vorp_whitelist folder to resources/
  • Add ensure vorp_whitelist to your server.cfg file
  • Import database.sql into your SQL database

Configuration

Create an application on the Discord Developer Panel and fill the config.js file. Your bot needs to have "Server Members Intent".

  • clientId : "Your OAuth2 client id"
  • clientSecret : "Your OAuth2 client secret"
  • token : "Your bot token"
  • guild : "Your discord server ID" (how to find a discord ID)
  • roles : an array containing the roles ID allowed (ex: ["00000000000000", "11111111111111"])
  • redirectUri : http://[your server IP]:7790/discord
  • checkRole : set to true to check if the player has one of the whitelisted roles. Set to false to only check for the player presence on your Discord server.

How it works

The resource will create an HTTP (listening by default on port 7790) that will listen for the auth token of a user.

When your player connects for the first time, a popup will redirect him to a discord login page. He'll then be redirected to the HTTP server created by the resource (your redirectURI) with an auth token.

This token will be used to get it's discord ID and associate it to it's steam ID. This will be stored in DB.

About

Whitelist discord

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 96.8%
  • Lua 3.2%