Cordwire - A modernized version of DiscordAcePerms

cordwire

Hello everyone,

This script is basically inspired by the DiscordAcePerms and Badger_Discord_API releases from @OfficialBadger

It combines both scripts into one easy to setup discord role ace permissions manager with exports.

This script allows you to get the discord information of a user while also using discord roles to set their access to in-game ace perm groups.

In the past I had noticed that some people had issues setting up his scripts, the main goal for this script is to fix this issue and also add a few more features to the scripts.

So what's been added or improved?

Changes
  • Add roles just by name rather than role id
  • Scheduled and manual forced syncing of current roles for players
  • Override roles which prevent a person from being added to other ace groups
    for example, if someone is under investigation, can’t just join and receive admin still.
  • Cached roles to avoid discord’s api timeout/limit
  • Editable connect card that features the ability to add more buttons or completely toggle
  • Removing the need of two scripts, thus removing the need to have the right resource name
    and merging the configs into one

How do I set it up?

Setup

Most of the config is self explanatory.

You need a discord bot setup using the discord developer portal and it should at least be able to manage roles and see members.

You will also need to activate developer mode on discord in advanced settings to get your guild(s) id and role id(s)

If you come across any issues make a reply, the config holds most of the information you need.

A wiki/tutorial gitbook is in plans.

Exports

exports.cordwire:GetDiscordId(src)
exports.cordwire:GetDiscordUsername(src)
exports.cordwire:GetDiscordAvatar(src)
exports.cordwire:GetDiscordNickname(src, guildKey)
exports.cordwire:HasRole(src, roleNameOrId, guildKey)
exports.cordwire:GetAllUserRoles(src)
exports.cordwire:AddDiscordRole(src, roleNameOrId, reason)
exports.cordwire:RemoveDiscordRole(src, roleNameOrId, reason)
exports.cordwire:SetDiscordRoles(src, { 'Role One', 'Role Two' }, reason)
exports.cordwire:GetGuildInfo(guildKey)
exports.cordwire:SyncPlayerPermissions(src)
exports.cordwire:GetPlayerGroups(src)

Download

Download: Github

6 Likes