Custom game teams builder for Valorant & League of Legends
Jetti
creates balanced teams for you to play fair custom games in Valorant
or League of Legends
. All you have to do is add your players to the database.
// add player to database
!add-player @user <skillLevel>
Now you can build teams by:
// pinging 10 players
!build @user1 @user2 @user3 @user4 @user5 @user6 @user7 @user8 @user9 @user10
// or by simply just having 10 players in the voice chat
!build
// you can also ping your missing players
// example | 8 in voice chat, 2 are missing:
!build @user9 @user10
Jetti
can also save Teams and Matches. Upload a screenshot of the scoreboard at the end of the game to record your cool gamer moments!
Create Teams (returns TeamID
)
!add-team <TeamName1> @user1 @user2 @user3 @user4 @user5
!add-team <TeamName2> @user1 @user2 @user3 @user4 @user5
Create Match between two Teams (returns MatchID
)
!add-match <TeamID1> <TeamID2>
Upload the scoreboard
!screenshot <MatchID>
All the cool technologies we used:
- TypeScript
- Discord.js
- Discord.js Commando
SequelizeSqlite & Postgres- Heroku
- GraphQL
- GraphQL-Codegen
- nodeJS (v12.0 or higher)
- Discord Bot Application
This section lists all permissions the bot needs in order to function properly.
Send Messages
: Required, Jetti responds via messagesMove Members
: Optional, Jetti can move players into voice channels
-
Clone or download the repo
$ git clone https://github.com/Glup3/Jetti.git
-
Install NPM packages
$ npm install
-
Create an
.env
file in the root folder and enter the secretsBOT_OWNER=12312312423321 BOT_TOKEN=YOUR_SUPER_SECRET_BOT_TOKEN_YOU_SHOULD_NEVER_SHARE
-
Run the discord bot locally
$ npm start
I use pgweb as GUI for our postgres instance. Can be installed for all operating systems. (I use MacOS)
pgweb --host localhost
heroku config:get DATABASE_URL -a <HEROKU_APP_NAME> | xargs pgweb --url
Every player gets a skill level (weight). They are from 1 to 6 (low to high).
- Level 1 = Iron
- Level 2 = Bronze
- Level 3 = Silver
- Level 4 = Gold
- Level 5 = Platinum
- Level 6 = Diamond
- Level 7 = Immortal
- Level 8 = Radiant
while no fair teams:
- create two random teams
- sum up skill levels for each team
- compare total skill level
- if difference of 1 --> fair teams
- else go to step 1
Use the command !help
to get more information about all available commands.
- https://discordpy.readthedocs.io/en/latest/discord.html
- https://discordjs.guide/commando/
- https://discordjs.guide/
- https://github.com/discordjs/discord.js
- https://discord.js.org/#/
- https://github.com/RobinBuschmann/sequelize-typescript#usage
- https://dev.to/anayooleru/modifying-an-existing-sequelize-migration-1mnn
- https://stackoverflow.com/questions/51509499/how-do-i-view-a-postgresql-database-on-heroku-with-a-gui
Best Editor: VS Code
Other choices:
- Atom
- Sublime
- Webstorm
- VIM
- ...
- ESLint
- Prettier
- Bracket Pair Colorizer 2 (Recommendation)
- Material Icon Theme (Recommendation)
- One Dark Pro (Recommendation)
-
Press
Ctrl + ,
(Settings UI) orCtrl + Shift + P
>Open Settings (UI)
-
Search for
format on save
See the open issues for a list of proposed features (and known issues).
Distributed under the MIT License. See LICENSE
for more information.
- Glup3 | Phuc Tran
- Sicari-s
- Easyzsz