Code Monkey home page Code Monkey logo

discordranksync's Introduction

Contributors Forks Stargazers Issues MIT License

Discord Rank Sync

Lightweight discord integration to synchronize ranks and reward your donors!
Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Installation
  3. Commands
  4. Developer API
  5. License
  6. Contact

About The Project

Extremely lightweight plugin to synchronize in-game ranks with Discord roles!

Here's why you should use this plugin:

  • Lightweight & Optimized
  • Easy setup; Drag & Drop (Set up your discord bot, and you are ready to go!)
  • Multiple database options: YAML, MongoDB, MySQL
  • Developer API in case you want to implement this in your plugins!
  • Extremely and easily configurable

(back to top)

Installation

This shows how you install the plugin.

  1. Create an application at https://discord.com/developers/applications
  2. Create a bot within the application and copy the bot token
  3. Click OAuth2 > URL Generator
  4. Check applications.commands & bot under Scopes
  5. Check whichever permissions your bot will require under Bot Permissions
  6. Copy the Generated URL and invite the bot to your discord server
  7. Drop this plugin in your ./plugins folder
  8. Once the config.yml is created, insert the bot token which you have copied and restart the server
  9. Join the server and start linking your account with /discord link!

(back to top)

Commands

This is a list of commands available in the plugin and their respective permissions required.

Command Description Permission
/discord Displays the Discord server's invite link None
/discord help Displays the command help menu in game None
/discord link Generates a code for you to link with your Discord account None
/discord unlink Unlinks with your Discord account None
/discord whois <player> Displays the target's Discord user information None
/discord reload Reloads the plugin configuration drs.reload

(back to top)

Developer API

This section is for developers who want to make use of this plugin's API.

API

package net.evilkingdom.discordranksync.api;

import org.bukkit.OfflinePlayer;

import javax.annotation.Nullable;

public interface DiscordRankSyncAPI {

    /**
     * Returns whether player is linked with a discord user
     *
     * @param player ~ The player to check if its linked
     * @return ~ Returns true if the player is linked with a discord user else false
     */
    boolean isLinked(OfflinePlayer player);

    /**
     * Get the discord ID of a player, if the player is linked
     *
     * @param player ~ The player to query for its discord ID
     * @return ~ Returns the discord ID as a string if the player is linked, else null
     */
    @Nullable
    String getDiscordId(OfflinePlayer player);
}

To get the API implementation:

DiscordRankSyncAPI api =  ((DiscordRankSync) Bukkit.getPluginManager().getPlugin("DiscordRankSync")).getInstance().getApi();

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

TheTrustyPwo - Pwo#0001 - [email protected]

Project Link: https://github.com/EvilKingdom/DiscordRankSync

(back to top)

discordranksync's People

Contributors

thetrustypwo 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.