Git Product home page Git Product logo

calamity-bot's Introduction

🤖 Calamity-bot

A Discord bot that drafts maps and bans for a game (Heroes of the Storm) tournament.

⌨️ Commands:

/newmatch
  • Create a new match registration (bans, fist picks and map).

    • options:

      The sequence in which teams are selected only impact the game when is selected a bo7 system, the team_1 will recieve the advantage setted on /config command.

      • system - Select a match system ex.: (Bo3, Bo5).
      • team1 - Select the first team role from discord server.
      • team2 - Select the second team role from discord server.
/help
  • Display the commands descriptions.
/config
  • This command allows you to configure or retrieve settings for the bot.

    To view the current settings, select the setting you wish to inspect, and leave the value option blank.

    Map setting instruction: To set map preferences, use the setting command followed by the desired maps enclosed in spaces. For example: Sky Alterac Cursed. Each map should be listed separately. Note that maps must be specified by a single name.

    Roles setting instruction: To set admin roles, use the setting command followed by the desired roles enclosed in spaces. For example: admin adm staff. Note that roles must be specified by a single name. (The role named 'adm' serves as the bot's default setting).

    Bo7 setting instruction: Modify the format of the Bo7 system for tournaments. If your tournament utilizes the Upper Finals Winner configuration, you can adjust the advantage given to the winning team.

    Using the setting Bo7 command, you can specify:

    • map: Automatically sets the toss coin winner to team_1. (default)
    • game: Sets the first game win to team_1.
    • none: Remove bo7 configuration.

📦 How to use:

You need to have node.js installed and a Discord account.

Clone the project and enter the project folder.

Install required packages into the project:

npm install

Copy the .env.example file to .env file on the project:

cp .env.example .env

Now, you need to create a bot in the discord developer portal. Click on New Application and give it a cool name. On the General Information tab copy the APPLICATION ID and past on the CLIENT_ID variable on .env file, like this example:

TOKEN=
CLIENT_ID=0123456789876543210

Now, at the Bot tab, click on "Reset Token" to generate a new token. Copy the token to the .env file:

Remember, it's crucial not to share this token with anyone else.

The .env file should be like this example:

TOKEN=EXAMPLE01234TOKEN
CLIENT_ID=0123456789876543210

THIS IS A VERY IMPORTANT STEP:

On the 'OAuth2' tab, under the 'OAuth2 URL Generator' session, select bot and applications.commands. Then, in the 'BOT PERMISSIONS' section, check the Administrator checkbox. This will generate the link to add the bot to a server. Simply paste the generated link into your browser to add the bot to your server.

Now, run the command:

npm start

The bot is now up and running! Head over to your server and enjoy it!

Notice: The bot may take up to 5 minutes to register the commands.

Once it's running, you can add the bot to multiple servers, and it will work seamlessly on all of them.

Author:

Katson Matheus html html html html

calamity-bot's People

Contributors

katson1 avatar

Stargazers

 avatar  avatar

Watchers

 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.