Coder Social home page Coder Social logo

ayaan-govil / tournabot Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 9.0 23.48 MB

A Discord bot designed to streamline start.gg tournaments and improve user quality-of-life through specialized commands.

Home Page: https://top.gg/bot/719283403698077708

License: GNU General Public License v3.0

JavaScript 100.00%
tournament discord matchmaking discordjs-bot nodejs announcing-tournaments bot smashgg discord-bot discord-developer-portal

tournabot's Introduction

TournaBot

Logo

TournaBot is a Discord bot designed to streamline smash.gg tournaments and improve user quality-of-life through specialized commands - built on Node.js and Discord.js.

Please check out TournaBot's top.gg page and the support/development Discord server if you need any help. You can find the invite link here.

Table of Contents

Main Features

  • Automatic tournament reminders an hour before your tournaments begin, which provide tournament/event information.

  • Automatic match calling called DQ pinging, which automatically pings users in a specified channel a minute after their match has been called.

  • User tournament results that include details and sets from a user's three latest tournaments.

  • Announcing tournaments with event and tournament information so that you don't have to.

  • A better matchmaking system that takes Discord role-based matchmaking to another level, enabling users to specify whether or not they want to be pinged for a role.

  • Search for tournaments by game directly in your Discord server.

  • Full localization through custom timezones and languages.

  • Custom prefixes so that TournaBot never clashes with other bots.

Contributing

Running TournaBot Locally

TournaBot was initially created on Windows, but is compatible with any UNIX-based system.

To create a Discord bot client, make an application through the Discord Developer Portal and create a client through the Bot tab. The bot's Token is used for authentication.

Dependencies

Node.js

TournaBot uses Node.js v12.0.0 or higher.

To install the required npm dependencies, execute npm run build through the console within the project folder. If you clone the project using git and the package.json file is empty, you can copy and paste the text from the web repository.

MongoDB

TournaBot requires a MongoDB instance to store data. The production version of TournaBot uses Mongoose to connect to a MongoDB Atlas database. If you don't know how to set up a local database, I recommend using this guide.

A connection string is required to connect to any database. Read this if you don't know what the connection string should look like. It must be set up before running TournaBot.

TournaBot uses the following collections for categorizing data:

  • announcemessages
  • channels
  • languages
  • matchmakingroles
  • matchmakingusers
  • pingroles
  • timezones
  • userids
  • prefixes

If there is no collection present for a given model, no data for that model will be collected.

Don't be afraid to join the support/development Discord server if you need help setting up the database.

Environment Variables

The following environment variables are required to run TournaBot locally:

  • PREFIX - The prefix used for each command
  • DISCORDTOKEN - A valid Discord bot token from the Discord Developer Portal
  • SMASHGGTOKEN - a valid developer token used to access the smash.gg API. You can create a developer token through Developer Settings found when clicking your profile picture on the bottom left of the smash.gg website.
  • MONGOPASS - The connection string used to authenticate into a MongoDB database.

Note that within the original production code, ALTDISCORDTOKEN is used to authenticate into a dummy bot that is used for local development. It is not required for testing locally.

The original production code uses a config.json file to store the environment variables, but there are other methods to storing them.

Testing

To run TournaBot locally on your machine, execute node index.js through a console within the project folder. It is recommended that you use nodemon for any testing that requires lots of saving and re-executing.

Support/Development

For any help you need, feel free to join the support/development Discord server and give yourself the Contributor role. This server also contains a list of requested features, incase you want an idea to start!

tournabot's People

Contributors

ayaan-govil avatar

Stargazers

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