[RELEASE] Guardian- An All New Discord Whitelist

Guardian

What is it?

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 ^^^ -- 
--------------------------

Requirments

Badger_Discord_API

Acknowledgments

Acknowledgments

Acknowledgments

  • Faxes- Original Discord whitelist script
    https://forum.cfx.re/u/faxes/summary

  • Badger- Amazing API, helping me figure out a deferral issue
    https://forum.cfx.re/u/officialbadger/summary

Photos

Photos

Downloads

Github- Jordan2139
Direct Download

If you enjoyed a like would be greatly appreciated :slight_smile:

15 Likes

Nice release for a change.

Thanks for the support!

That could be a really useful release, I’ll have to check it out as soon as possible.

1 Like

Nice release. Thank you!

1 Like

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?

1 Like

Have you correctly installed Badger_Discord_API and set up the config for the script correctly?

As far as I am concerned, yes, I looked at the video in your post and it did not work.

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?

any console errors?

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.

they need to have discord downloaded on their pc (not browser) and if this persists have them restart Discord and FiveM

I screen shared with them, they did have discord desktop open and restarted both. Still didn’t work.

1 Like

i tired to do they script and it says the fx_manifiest is not correct can you push a update where its correct.

the fx_manifest def works. make sure your artifacts are up to date.

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

Doesn’t work. plz fix :smiley:

After extensive testing (about 50 attempts to connect) the script did not allow the player to bypass the whitelist. Please download this fix here: Release AddEventHandler("playerConnecting"... Fix (MAYBE) · Jordan2139/Guardian · GitHub

1 Like

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.

Their Fivem should be authorized with discord .