TypeRacerStats is a Discord bot partnered with with TypeRacer and was made with the Discord.py API wrapper, TypeRacer APIs, TypeRacerData APIs, SQLite, and various Python libraries (can be found in requirements.txt
). It comes with over 40 commands to provide extensive statistics and features for users. Many of them are designed to help with improvement on the site. Run -help
or refer to the commands section below.
Some commands are , which means they provide statistics regardless of the TypeRacer universe—separate environments of TypeRacer with distinct texts, leaderboards, and scores—selected.
Another feature that some commands have is the ability to your Discord account to a TypeRacer account; for commands with said feature, linked users will not have to type their TypeRacer username every time. This can be done using the -link [typeracer_username]
command.
Finally, some commands' functionalities are limited according to the bot permissions a user has: regular, bot admin, or bot owner.
Info commands provide information for the bot.
Name | Example | Function | Aliases |
---|---|---|---|
-help [command] |
Returns information for given command. Case sensitive and aliases may be used in place of [command] . |
h |
|
-info |
Returns information about the bot. | abt , about |
|
-invite |
Returns an invite link for the bot. Refer to the Invite/Permissions section below for permissions. | None | |
-donate |
Returns donation link to support the bot. | support |
Configuration commands allow server admins to change the bot's prefix and users to configure the settings of their Discord account with regards to the bot.
Basic commands do not require a user's information to be downloaded to provide statistics.
Name | Example | Function | Aliases |
---|---|---|---|
-stats [user] |
Returns basic stats for given user. | prof , profile |
|
-getdata [user] |
Downloads given user's data; Advanced commands may be used after. | dl , gd , download, |
|
-today [user] <date> |
Downloads given user's data for specified date. yesterday , yday , yd are special aliases. |
day , yesterday , yday , yd |
|
-realspeed [user] <race_num> or -realspeed [url] |
Returns realspeeds for given race. | rs |
|
-realspeedaverage [user] <first_race> <last_race> |
Returns the realspeed average for given race interval. may request up to 150 races. |
rsa , rsa* |
|
-raw [user] <race_num> or -raw [url] |
Returns realspeeds and raw speed (speed with correction time omitted) for given race. | None | |
-lastrace [user] <race_num> or -lastrace [url] |
Returns all users' realspeeds ranked by unlagged for given race. | lr , last |
|
-adjustedgraph [user] <race_num> or -adjustedgraph [url] |
Returns specified race's adjusted WPM over time. | ag |
|
-matchgraph [user] <race_num> or -matchgraph [url] |
Returns specified race's unlagged WPM over time for everyone in the race. | mg |
|
-leaderboard [category] <amount> |
Returns a leaderboard for given category: races/points/textstyped/textbests/toptens . |
lb |
|
-competition <category> |
Returns the daily competition for specified category: points/races/wpm ; defaults to points |
comp , c |
|
-lastonline [user] |
Returns the last time a user played. | lo , ls , lastseen |
|
-medals [user] |
Returns the medals a user has. | None | |
-toptens [user] |
Returns the number of text top 10s a user holds. can request JSON breakdowns with 10* . |
10 , 10* , toptens* |
|
-timebetween [url] [url |
Returns the time between 2 races | diff |
Advanced commands provide detailed statistical calculations, graphs, and services aimed to help users improve their typing speed and TypeRacer statistics.
Other commands provide resources, information, and links related to TypeRacer.
There are three things the bot must do to keep the data and itself maintained. All of these are done automatically and routinely by the bot in the background, so the bot remains 100% functional while the processes take place. These processes can be found in TypeRacerStats/TypeRacerStats/Core/Common/maintenance.py
.
- Update TypeRacer users' data every 24 hours even if they have not called
-getdata
that day. - Drop the temporary tables created from
-today
and-competition
calls every 24 hours. - Scrape all text pit stop pages for texts' top 10 data once a week.
Thank you to:
- the members of the TypeRacer Discord Server for command suggestions;
- http://typeracerdata.com/ for some of its APIs and database.
The bot can be invited using this link. The default prefix is -
, and it can be changed with -changeprefix [prefix]
.
- Send Messages
- Embed Links
- Attach Files
- Read Message History
- Use External Emojis
- Add Reactions
If you want to contribute towards hosting fees, refer to the following link.
Each month of hosting costs 6 USD, so the perks tiers are incremented by 6 each:
- Tier 1 ($0.01 - $5.99): Name listed on
info
command and access toecho
command - Tier 2 ($6.00 - $11.99): Set custom embed color with
setcolor
- Tier 3 ($12.00 - $17.99): Custom command added to the bot
- Tier 4 ($18.00+): Access to commands via bot DM