A Discord bot to manage your stocks in Codeforces! On registering your Codeforces handle with the bot, the bot gives you 100 of your stocks and $20 of cash. You can sell your stocks, or buy other stocks from the market. The price of the stocks depend on your rating, and is given by the formula (1.2)^rank * rating/100
where rank is the number of ranks above Newbie.
-
Create a Discord bot and get it's token. Follow the instructions here!
-
Then export the token as an environment variable:
export STONKS_TOKEN="<YOUR TOKEN>"
-
Install the latest version of discord.py using
pip install -U discord.py
. -
Run the bot using
python main.py
(requires Python 3.7 or above)! -
The prefix is
+
. To get started, register your Codeforces handle first using the+register
command. Type+help
for a list of commands. -
Note that the Admin-only commands require you to have a role called "Admin".
-
It is recommended to disable trading from the start of contest till the next rating change. Use
+trading disable/enable
to disable/enable trading respectively. -
Make sure that you use the
+updateratings
command to update ratings for all users after every contest.