Giter Club home page Giter Club logo

discord_roles's Introduction

discord_roles

Automatically add players to principals based on their roles in a Discord guild.

Dependencies

Installation

  1. Install all dependencies.

  2. Clone to a folder in your resources directory:

    cd resources/[local]
    git clone https://github.com/kibook/discord_roles
  3. Set your Discord guild ID in config.lua.

  4. Optionally set a bot token in config.lua, or leave it commented out to use the default token set for discord_rest.

  5. Add the following to server.cfg:

    exec @discord_roles/permissions.cfg
    start discord_roles
    
  6. Restart your server.

Usage

Players will automatically be added to and removed from principals based on their Discord roles as they join the server. The principals are named in the form of:

discord.role:<role ID>

These principals can then be used to add players to other principals or to add aces:

# Add players with the Moderator role on Discord to group.moderator
add_principal discord.role:<ID of Moderator role> group.moderator
# Add a tag in chat for players with the Friend role on Discord (see https://github.com/kibook/poodlechat)
add_ace discord.role:<ID of Friend role> chat.friend allow

To force a refresh of roles (for example, after modifying roles on Discord), use the refresh_discord_roles command.

discord_roles's People

Contributors

kibook avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.