Love Theme Economy Bot - Howto
Setting up on GNU/Linux
Setting up Love Theme on a GNU/Linux operating system is easy. Simply create a .env with the follwing:
TOKEN = [your bot toke here]
Then, navigate to the location of the main.py file in terminal and install the following prerequesite:
pip install discord.py
If you get an error like this, your distro has adopted PEP 668 and will not allow the installation without a virtual environment. There is a simple fix.
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
You can simply setup a virtual environment in the directory. Try:
sudo apt update && sudo apt install python3-venv python3-full -y
Then:
python3 -m venv .venv
Finally:
source .venv/bin/activate
Now, you should see a (.venv) in front of your shell prompt. You are now good to try the installation again. Now, you can run the bot:
python3 main.py
You should see a little aknowledgement text appear in the shell. Then, your bot is running!
To deactivate the virtual environment, simply type deactivate .
Commands
/work - increments the user's balance by their salary
/balance - display's user's balance
/job - provides a button menu where the user can select which job they'd like to purchase (each with both increasing prices and salaries)
/coin [guess] [amount] - allows a user to make a bet, pick a wager, and flip a coin. They win or lose the value of their wager depending on their guess.
/transfer [user] [amount] - transfers the specified amount from the user calling the command to the user mentioned (WIP; currently broken).