GithubHelp home page GithubHelp logo

hista's Introduction

Hista

Discord bot for role management: basically you have a message, you add an emote, it give you a role.

How does it work

To begin with, create a file named token.txt in a 'Keys' folder located next to your executable, please your bot token inside it.
Once you done that, you need to understand that there are two kind of role assignation:

Roles

They are basic roles that can be assigned to an user, you must have a "roles.json" file in the 'Keys' folder, next toyour token.txt file.
Your JSON must be an array under the name roles and for each element contains the following key:

  • emote: The emote unicode character
  • guildId: ID of the guild containing the message giving the role
  • channelId: ID of the channel containing the message giving the role
  • messageId: ID of the message giving the role
  • roleId: Role given

Example of file:

{
  "roles": [
    {
      "emote" : "โ—",
      "guildId": 146701031227654144,
      "channelId": 599581908963426304,
      "messageId": 602940259860348968,
      "roleId": 599575719541997568
    }
  ]
}

Factions

Factions are roles where only one of them can be given at the same time.
That means that if an user try to get a second one, he will loose the first one.
The JSON name is "factions.json" and is located next to your token file.
It contains the file values as roles.txt, plus a "defaultRole" array containing for each element:

  • guildId: Guild concerned by this default role
  • roleId: Default role ID

If a default role is set, it'll be assigned to everyone when the bot is launched.
If an user quit his faction, the default role will be assigned to him.

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.