Discord Role Sync

4.99 USD

Discord role sync

Description πŸ’¬

This script allows members of your Discord server to automatically receive roles depending on the access on the server. This will be a great addition to RP servers, so that players like cops, medics, and others can automatically get roles on the server that would open access to faction channels. This is just one example where this system can be applied.


Features πŸ—’οΈ

  • Standalone script
  • Support ESX, QBCore and NDCore Frameworks
  • Simple configuration
  • Framework jobid or fivem permission (IsPlayerAceAllowed) check
  • The definition takes place according to the Discord profile associated with FiveM client

Exports list πŸ“œ

You can use the functions of this resource in other modules through the system of exported functions

  • getPlayerDiscordRoles(source: number, cb: void): void -> Get current player discord roles
  • getPlayerDiscord(source: number, cb: void): string -> Get player discord
  • setDiscordToken(token: string): void -> Set bot token

Example config βš™οΈ

Config = {}

Config.Token = "" -- Bot secret token
Config.SyncIntervalMinutes = 5 -- Sync interval in minutes

Config.StorageFilename = "players" -- filename for storage data

Config.GuildID = "336710648224546816" -- Discord guild identifier (server id)
Config.Roles = {
    {
        ["role"] = "1062792257759096832", -- Discord role ID
        ["ace"] = "admin", --- Give role is Player has permission (IsPlayerAceAllowed check)
        ["job"] = "police" --- Give role is Player has job/role in framework system (Depends on current framework)
    },
}

Other data



Code accessibleConfig
Subscription-basedNo
Lines~400
RequirementsESX, QBCore, NDCore optional
SupportYes
Future UpdatesFree