There is the !tfix command, available all the time, which gives advanced tools to T.O.s to try to correct any problems that arise during their tournament, or just perform advanced and controlled actions.

Use !help tfix to see the full set of commands, and!help tfix <command> to see a detailed description of one of the commands.

Info

If none of the commands described below solve your problem, or if you are not too confident, join my server and ask me to help you. These commands will never be able to solve or diagnose you all the problems, so the owner of the bot should help you to look at the logs or to carry out manipulations.

A channel #support-urgent is also available on my server for critical bugs occurring in the middle of a tournament, mention the role and we will help you as soon as possible !

I will therefore describe these commands, starting with the safest ones.

Refreshing

!tfix refresh

Updates tournament information from Challonge. This updates the tournament title as well as the limit of participants that are only collected at the initial stage of the !setup

Info

The scheduled tournament launch date cannot be changed due to all the calculations and verifications required for the automatic registration and check-in dates based on this.

In this case, start from 0 with !reset.

Registrations

!tfix registerfromrole

Here is a command that can be very useful if a problem forces you to reset.

This command allows you to register all members of a role on your server in the tournament at once!

Also note that if the check-in is passed, all members of this role, including those already registered, will be checked. So you can use this to check a role as well.

Example

!tfix registerfromrole Registered to tournament

It may take a while depending on the number of members to update.

Restoring and reloading

!tfix restore

I hope you will never have to use this command… It is not dangerous, but is useful in a case of bad tournament recovery.

When reloading the module, or even restarting the bot which can happen at any time, the bot will perform a process to reload the tournament from the disk save, and restart everything correctly.

It is possible that this process will fail, in which case the bot will suddenly start saying that there is no tournament in progress, no matter what commands are used.

In this case, use !tfix restore to see if the bot will successfully resume the tournament.

!tfix reload

Probably the most efficient command of all, it’s the one that will perform the most actions, but is also at a very low risk.

Indeed, this command will save everything, erase from memory all the objects linked to your server, then rebuild all the objects from what is saved. Think of it as restarting Windows and poof, magic, no more problems.

In addition, if you decide to edit your parameters with !tset, you must use this command so that the changes apply to your tournament (once the tournament is setup, the config is imported and does not move, except in case of reload). However, avoid editing the registration and check-in times and then reloading, you could end up with registrations starting and then closing immediately …

!tfix unlock

A somewhat special command that allows you to unlock certain commands.

Bracket-changing commands, such as !win, !ff, or !rm may hang and not respond, while other commands respond correctly. In this case, the use of this command can unblock the situation.

Technical explaination

There were sometimes conflicts between updating the bracket and setting a score. Before beta 8, there could be a problem when a score was settled at the same time as the refresh of matches, the bot would then restart a match incorrectly and then end it 15 seconds later.

To avoid this problem, the above commands cannot work at the same time as refreshing the bracket, so they are blocked while waiting for the end (this should not take more than a second). However, if a bug somehow occurs and does not properly unlock these commands, then you can use this command to force the resumption of commands.

And for those who know Python and asyncio, we use an asyncio.Lock() object for each tournament, and the !tfix unlock command will force the unlock with lock.release().

Background loop task

You can have more details on the background task of tournaments here.

!tfix pausetask

Pauses the background task. Then, the bot will stop updating the information, no more matches will be launched, no DQ participant, no set on stream launched … The tournament is frozen.

This is useful if you want to manipulate the bracket, to avoid 25 new matches starting and being interrupted 30 seconds later.

!tfix runtaskonce

Starts the function once, without relaunching the loop.

Useful in case of bracket manipulation, and you want to confirm the changes before relaunching for good.

!tfix resumetask

Restart the background task for good after its break, it will run again every 15 seconds.

If you observe that the task has stopped due to a bug, this is the command to perform to try to resume the tournament! Note, however, that the task will only really resume if no bug occurs during the first run.

The !tinfo command specifies whether the task is not running.

Zone de danger

Warning! The commands below are dangerous!

Really, I insist very strongly on this point, absolutely read the description of the commands before using it with !help tfix <command>, most do not ask for confirmation!

You need to be pretty sure of yourself before touching certain commands, as you are delving directly into the inner workings of the module.

Don’t hesitate to ask me for help on Discord @El Laggron#0260 (server on the left) before going through this.

!tfix resetmatches

Available during the tournament, this command will erase all internal information about the matches in progress.

They are not canceled, the bot will immediately retrieve the matches from Challonge and restart them (if the task is active).

What happens is that the bot will forget what it itself knows about the matches, namely the channels, the start time, the end time, the streams… Everything will therefore be restarted.

Note

Existing channels will not be deleted, unless you request it by adding an additional argument, call the command this way:

  • !tfix resetmatches yes

!tfix resetparticipants

Available before the start of the tournament (registrations), this command will erase all registered registrants.

If they were uploaded to the bracket, they will stay there until you redo !upload.

You can also leave the participant list as it is, and the bot should correctly pick up everyone when the tournament starts.

Note

Participant roles will not be removed, unless you request it by adding an additional argument, call the command this way:

  • !tfix resetparticipants yes

!tfix hardreset

You can imagine it from the name, outright reset of everything the bot knows about the current tournament, back to the initial state, ready to set up a new tournament.

This command is very straightforward, all it does is erase tournament data from internal memory and backups. Nothing will be in progress, everything is cancelled.

Note that the command does not do any of the following :

  • Any manipulation of the Bracket. Challonge is never called, it remains as is.
  • Withdrawal from roles. Everyone retains their role of participant.
  • Removal of channels. Everything remains present.
  • Prevention of members. No DM, no announcements, no one notified except the person running the command, then the bot will suddenly say “No tournament in progress”. It is your role to warn the players of this action.

Obviously, no going back possible, this command is final, therefore to be used with great care.


Once again I remind you that we are available to help you in the event of a problem. Me, El Laggron, the author of this module, and my team (Xyleff and red? Lol I don’t know yet) are available on my server to answer your questions and help you.