This discord bot was built for virtual team time trials on Zwift organized by WTRL. It takes the position of the DC and announces who has to lead next and for how long. Of course, the bot is not a replacement for a real coach but helps you to stay organized during an exhausting team time trial. The bot joins the discord call with your team mates and gives voice commands to everyone.
This is a follow-up project of the TTT-Timer Web App.
Click here to install the bot to your server
You will be asked to grant multiple permissions:
|Send Messages||Allows the bot to send messages to a text channels|
|Manage Messages||Allows the bot to update other users messages. This is used to create a button-like behavior when clicking on the emojis below the timer’s status message.|
|Connect||Allows the bot to join a voice channel|
|Speak||Allows the bot to send audio / voice to a voice channel|
||These are command options that you can individually define. Replace these options including the
||Angle brackets represent optional options. These may be left out and either lead to a different behaviour or a fallback value will be used|
||Used in the examples to represent Discord mentions. Do not actually send the
/timer athlete <athlete> <time>
Set the lead time of an athlete. The user must be added to the athletes list before using the
/timer athletes command.
You can also mention a user instead of typing their name.
/timer athlete Andi 45 // or /timer athlete @Andi 45
Sets the lead time of Andi to 45 seconds
/timer athletes [<athlete1>] [<time1>] [<athlete2>] [<time2>] ...
If all options are omitted, returns the configured athletes.
Otherwise, sets the list of athletes in the team and their lead times. The lead times are optional and default to 30 seconds.
You can also mention a user instead of typing their name. The voice commands will use the username at the time of sending this command, so make sure to change it to something pronouncable.
/timer athletes Andi:45 Victor // or /timer athletes @Andi:45 Victor
The team now includes Andi and Victor. Andi leads for 45 seconds, Victor for 30.
/timer delay [<time>]
<time> is omitted, returns the configured start delay
Otherwise, sets the start delay in seconds.
/timer delay 300
The timer will wait for 5 minutes before giving commands
/timer fresh [<athlete>]
The athlete won’t be skipped anymore. If the user sending this command was mentioned when configuring the timer the name can be omitted. This command doesn’t change the order of the athletes.
/timer fresh Andi
Andi will join the lead rotation again
If the user sending this message was mentioned when configuring the timer, they will join the lead rotation again
/timer language [<language>]
<language> is omitted, the bot replies with the configured language.
Otherwise, sets the language of the voice commands. Available languages are:
/timer language en)
/timer language de)
/timer language cz)
/timer toast [<athlete>]
The athlete is skipped until writing
/timer fresh [<name>]. If the mentioned athlete is currently leading, the remaining time is skipped and the next athlete is announced with “Go <name>”.
If the user sending this command was mentioned when configuring the timer the name can be omitted. This command doesn’t change the order of the athletes.
/timer toast Andi
Andi is ignored when the bot announces the next leading athlete
If the user sending this message was mentioned when configuring the timer, they will be ignored when the bot announces the next leading athlete
Shows help message
/timer plus <time>
Adds time to the timer of the currently leading athlete. This is temporary and on the next rotation, the athlete will do their previously configured lead time again.
/timer plus 15
Adds 15 seconds to the clock of the currently leading athlete
Stops the timer and resets all configuration of the bot for your server.
The remaining time of the current athlete is skipped and the next athlete is announced with “Go <name>”. This is a one-time skip.
If the timer hasn’t started yet and is still waiting for the start delay to tick down, this command will skip the remaining time and immediately start the race with the first athlete.
Starts the timer. The bot joins your current voice channel or the channel from a previous start.
Stops the timer and leaves the voice channel.
When starting the timer using
/timer start, a message is send to the current channel. This message automatically updates and includes the currently leading athlete and the next athlete including their leading times.
The bot automatically reacts with three emojis to this message. These can be used as buttons to control the bot during a race and to avoid typing.
|Emoji||Equivalent Slash Command||Note|
||This only works if the user was mentioned when athletes were configures.|
The bot automatically gives commands 1/2/5/10/15/30 seconds and 1/2/3/5/10 minutes before a change or the start of the race. Also, a command is given on the actual change/start and when skipping an athlete.
Discord does not allow a bot to join multiple voice call at a time. To run multiple timers on the same server in parallel, I am hosting multiple instances of the TTT-Timer. The additional bots have the same behaviour as the main bot, but with a separate configuration and a different command prefix.
|Slash Command||Install Link|
||Install Bot 1|
||Install Bot 2|
The discord bot is hosted on Heroku using servers in Europe. The voice in generated using Google Translate. Therefore, the athlete names are visible to them.
The bot doesn’t log or store any information that is not required for the use or monitoring of the bot. All information is automatically deleted when removing the bot from your server.
All code is publicly available on Github.
|Slash commands are not displayed in Discord||Slash commands were only added in a later update. They will only show up after reinviting the bot to your server using the install link.|
|The ☠️ button of the status message doesn’t work||You can only use this button if you were mentioned during the timer setup.|
|The ➕ and ⏭️ button stay clicked||The bot requires the “Manage Messages” permission to remove your reaction from the status message in order to provide a button-like behaviour|
|The timer doesn’t react ti any chat message command||Make sure the bot has permission to read and write messages in your channel. Without those permissions, the bot cannot be used|
Support this project using PayPal