DiscordAcePerms [Release]

Alright, no worries. I’m not all that good with Lua myself.

@Matt_Wolf Hey! Developer of DiscordDB here! If you wish to use my resource with Badgers Ace Permissions Resource, simply change the code in the screenshot:
image

With the following:

identifierDiscord = exports.discorddb:GetDiscordID(src)

Thanks so much. I like your resource far more than the old discord_perms one.

If you fork my resources with your changes to work with your script. I’ll add them to the main pages for ease of use. However, I will not update or provide support for the forked versions. Just keep that in mind, way too busy.

Is there a way to use this script with vMenu permissions?

Yes, just give the different permission groups the vMenu permissions you want

Started resource discord_perms-master
Creating script environments for DiscordChatRoles-master
Error parsing script @DiscordChatRoles-master/server.lua in resource DiscordChatRoles-master: @DiscordChatRoles-master/server.lua:1: unexpected symbol near '<\239>'
Failed to load script server.lua.

Do you know what I may have done wrong do get this when adding the discord_perms resource?

Thanks

Edit the script with notepad++, not notepad. Notepad editing will cause invalid formatting with .lua files.

Is it possible to give 1 discord role multiple permissions? We have a few resources that can use Aces but they each have their own perms. For example, we have a panic script for LEO and Fire, a PASS Device for Fire, and a Pager/fire siren for Fire and EMS. I have a discord role that allows emergency personnel to get their vehicles and weapons/equipment via your vehicles and weapons resources and would like to set that same role to get all the Aces for all 3 of these resources (as well as a couple others that need to go to just LEO and just FD.

Also, in regards to removing someones role and having it be effective without a restart. I may have read this resource wrong but doesn’t it check for roles when someone logs in? Say if someone has an LEO role, logs in and is granted access to anything that the LEO should have ACE perms for, then they get fired from LEO and their role gets removed in discord, If they log out and back in, wouldn’t it not give them the LEO ACEs since they don’t have the LEO role when they logged back in?

Basically, kinda wondering if this will work or if this will just break the resource.

{roleIDforEmergency, "Police-Panic.group.user"}, --[[ Panic Tune User --- ]] 
{SameRoleIDasAbove, "Police-Panic.group.autotuneuser"}, --[[ AutoTune Panic --- ]]
{StillSameRoleID, "fire-ems-pager.group.user"}, --[[ FirePager --- ]]
{RoleIDforDeptFTOs, "fire-ems-pager.group.supervisor"}, --[[ FireSiren --- ]] 
{RoleIDforModerators, "group.moderator"}, --[[Moderators ---]]
{RoleIDforAdmins, "group.admin"}, --[[Admins ---]]

Should work fine

So I am trying to setup DiscordAcePerms, basically get my roles in discord to give me permissions in vMenu.
I have set up everything, and when I look in my console it doesn’t give any errors. discord_perms is all set-up, vMenu is all setup, and my permissions.cfg are also setup.
The order in my server.cfg is right, I believe. exec permissions.cfg is also in there.
I will put all screenshots below, since my console adds me to the group, but still doesn’t give permissions like they are setup.

https://gyazo.com/fae96060d4420dafbe1f0fbb54818a9d
https://gyazo.com/db7215639b8956b72ff1589ab13fbbd1
https://gyazo.com/6ff2613c9622e582302f1634c8f784ea
https://gyazo.com/34503a8dfae5881097121f0e579c292a
https://gyazo.com/a3e9824f9d1a3d05010016b10b03c85c
https://gyazo.com/b190f74de2976568a54e2e5bd2ba3ab1

Follow all the steps listed in the post.

I have done the same thing. In console it shows that the player was added to the group but when in game he/she doesn’t actually have the permissions @OfficialBadger @ZackAllan

You have not followed all the steps… You must add a line to the server.cfg for it to work properly.

I did, I followed all instructions and even added add_ace resource.DiscordAcePerms command.add_principal allow to server.cfg, even in console it’s says added to group.admin but it doesn’t actually give it to the player.

What is the resource folder named?..

DiscordAcePerms
image
add_ace resource.DiscordAcePerms command.add_principal allow to server.cfg
image
added to group.admin

No idea, works fine for me… Most likely you have not set up permissions correctly