This is a pretty simple resource to use, and it basically allows you to use discord roles as a means of “Authentication” for certain permissions.
In the config.lua, make sure to have a Discords bot token present (MAKE SURE NOT TO PREFIX IT WITH Bot AS IT AUTOMATICALLY DOES THIS FOR YOU), and also the guild id of where you want the roles to be checked. The roles table is formatted like such: ["Role Nickname"] = "Role ID" - You can get role id by doing @RoleName
suggestion: fetch roles that exist for a user in general (and names from guild configuration?) and add additional principal inheritance so that permission checks can remain generalized
screw people relying on xPlayer.job ==, vRP’s whatever, this export set; everyone should just add more principals for whatever they do
Pardon me if anything I ask here is stupid, I’m very new to scripting and I’d probably benefit from being spoken to like I’m a 5 year old.
I have two problems.
I configured the resource correctly with the information, fed back the correct guild info on the server side of things, but I was getting this error while trying to call the export.
So I decided that maybe my version of the FXServer didn’t support exports properly (I have no actual idea, it was just my next logical thought) and this is where problem two comes in…
Now running the server build from 2019-Jan-14 14:15 (unsure of what build I was running previously), I get this message upon starting the server which related back to discord_perms.
In short it now completely doesn’t work, and I have made no changes to the original code.
I can probably fix the second issue by reverting back to the server version that it worked with but I have no clue on where to begin on the first one. Any ideas?
Somehow the get request for you isn’t returning any data, at the bottom, I can’t test currently but through all of my testing it has worked fine for me