Looking for a Discord bot that runs on DiscordJS v14 / latest. 

We have a soccer game in development but don’t have a built-in tournament system at the moment.

The bot will run as an automated tournament system. 

The manager will create the tournament using a command. Users can then sign up to the tournament and then once the tournament is 30 minutes from starting, users can check in to the tournament. Once the final 30 minutes is up, players will be paired randomly into groups of two. The bot will then post the match list showing User vs User. The users can then play the match, report the score and then the winners from each will be paired against each other again randomly. We will eventually end up with just four participants. After that match has been complete, there will be a double final with the winner vs winner and loser vs loser. So a standard elimination 1v1 format with a third-place match. At the end, the top four players will be listed along with some key stats from the tournament. 

We will use slash commands for participation and running the bot. 

Commands: 

/createtournament <date/time> - Starts up a tournament 

/canceltournament - Cancels the tournament and cleans up 

/jointournament - Allows users to join the tournament during registration / check-in phase. Add participants that join to role 1285122963535822869

/leavetournament - Removes user from the tournament along with checkin if it’s active. 

/checkin - Only active for the 30 minutes before the start of the tournament. Only players that check in will be in the participants list. 

/reportscore - Allows one of the players from each match to report their score. Using the option "Your score" and "Opponents score". Add a message if the other participant tries to report the score as well. 


At the end of the tournament, a message will be sent showing the top four 
1st Place: @user1 
2st Place: @user2 
3rd Place: @user3 
4th Place: @user4 

Also showing some key stats under the winners list: 
Top Scorer (The user who has scored the most out of all of their matches) 
Most Goals in one match: (The user with the most amount of goals in a single match) 
Most Clean Sheets: (Those with the most amount of matches with no goals conceded)
Total Goals: (The total amount of goals scored in the tournament) 
Participants: (The total amount of participants that checked-in)  


We need a cron job that will ping role 1285122963535822869 30 minutes before the start of the tournament and have the message "Tournament is due to start in 30 minutes, type /checkin to confirm your participation”

We can keep the join tournament command active right up until the tournament starts. So that users can still join and check-in during the final 30 minutes. 

Need another cron job that will:
Start the tournament at the specified time set on /createtournament 
Stop the join command and the check-in command 
Remove participants from the role 1285122963535822869
For an odd number of participants, add a BYE match and add that user to the next round. 
Ping all users who have checked in and list all the random matchups along with any BYE matches. 

The part I need your help with will be the structure of the backend system. We need a way to keep track of every round with participants and reported scores. We need it in a way it can be easily accessed by the bot, and not all be in the same file to help with rounds towards the end. We need it to be able to tell who won and who lost each match along with correctly setting up the final round, which will be the Winner vs Winner and Loser vs Loser of the Semi-Final, and then be able to correctly identify the top four participants along with all the stats mentioned above. 

The channel ID for sending tournament messages / updates is 1068495033822609448 

We also need to make sure that no matter the number of participants, we always end up with just four players for the semi-finals. 

Summary: 

Manager creates tournament
Users join tournament 
30 minutes before, message is sent out pinging the role 1285122963535822869
At tournament start time, randomly match up all checked in players and then ping all players with their match ups. 
Once all scores for that round have been reported, move on to the next round, randomly matching up the winners from the previous round, and pinging the remaining participants with the matchups. Repeating until just four players are left. 
After the Semi-Final scores have been reported (Semi-Finals being just four players left), set up the finals which will be a match between the winners of both semi-final matches and a match between the losers of the semi-final matches. 
Send a tournament summary mentioning the top four participants in order from 1st to 4th, along with all the key stats from the tournament, along with mentioning the users for Top scorer, Most goals in one match and most clean sheets.