Essentially Guardian is a script that will replace Faxes old Discord whitelist that requires you to setup yet another bot token and pull Discord role id’s. This script utilizes Badger’s new Discord API. This will make things much easier and won’t require you to pull Discord role id’s 19 times while making your server.
Configuration
-----------------------------------------------------------
-- Guardian- A Simple FiveM Script, Made By Jordan.#2139 --
-----------------------------------------------------------
-------------------------------------------------------
-- CONFIG YOUR PERIPHERALS HERE! --
-------------------------------------------------------
Config = {
DiscordYeet = 'Sorry but this server requires you to have Discord (Desktop Edition) to play. Please restart FiveM and Discord if it is already open.', -- Message to client if their discord cannot be found by the script
WhitelistYeet = 'Sorry but this is a whitelisted community if you would like to join please see our website- WEBSITE to apply!', -- Message to client if they are not whitelisted
RoleIdsYeet = 'Sorry but I could not find your role ID\'s please reconnect and if this persists please contact the server developer',
WhitelistRoles = { -- Roles that you assigned in Badgers API that should pass the whitelist
"Whitelisted",
"MaybeWhitelisted",
"ScrewItMakeThis",
},
}
--------------------------
-- ^^^ DO THAT HERE ^^^ --
--------------------------
When I try to use the script it just gets stuck on connecting checking discord whitelist and does not go passed that screen. Anything I can do to fix it?
getting
" Sorry but this is a whitelisted community if you would like to join please see our website- WEBSITE to apply!"
when any of us is trying to join the first time, works after 3 or 4 tries, only me?
FiveM still have issues with discord it not recognizing people? I have this installed, most people can connect, but a few can’t. They have discord open and the roles needed.
Please remember that FiveM wont connect to Discord client sided, if the client is running Discord as administrator. Also make sure Discord is open and running properly BEFORE they open FiveM. If they are having trouble still, have them go down this checklist:
Some of the below listings may not affect this issue, but it never hurts to try!
Using Normal Discord (Not BandageBD or BetterDiscord)
Not running Discord as administrator
Not running FiveM as administrator
FiveM Account is Linked
FiveM has authentication privilages granted to Discord
Script works perfectly, however I’m seeing this in my server console the last few times it’s auto restarted.
SCRIPT ERROR: @ Guardian/version_check.lua:38: attempt to index a nil value (local ‘Data’)
Nothings been changed regarding the script since I added it to my server (except updating just now), & up until a day ago that error wasn’t showing up in my server console.
Just to clarify, that error does still appear after updating.