-
Notifications
You must be signed in to change notification settings - Fork 1
Linux Setup
(Note: The commands listed may or may not be incorrect. I am not a Linux user.)
This project uses Python 3.12, which can be downloaded from here.
Note! The below instructions assume your Python installation can be found under PATH
.
If it is not, open a command prompt and use this before following the instructions below (if the location of your Python install is different, you will need to change the paths):
export PATH=/usr/bin/python3:/usr/lib/python3/dist-packages:$PATH
Afterwards, run the script and/or commands using this command prompt window. If you close it, you will need to enter the above command again.
You can use the following command to view what version of Python you have:
python3 -V
- Run
./setup
- Verify there are no errors
- Replace the value of
DISCORD_BOT_TOKEN
in.env
with a valid bot token
Note: The script will not clear an existing .venv
. If a .env
file already exists, it will attempt to rename it to .env.bak
. If that file already exists, you may be prompted to overwrite it. Choosing no will not stop it from overwriting the .env
file.
(The below commands assume you are running them from the repository's root directory. If you are not, change the paths to lead to the directory.)
-
Create a virtual environment
python3 -m venv .venv
-
Activate the virtual environment
source .venv/bin/activate
-
Install the required packages
pip install -r requirements.txt
OR
pip install [package from the requirements list below]==[required version]
-
Create a
.env
file containing the following:-
FRACTALTHORNS_USER_AGENT
: The user agent to display when making requests (e.g.:"Fractal-RHOMB"
). You can add, for example,{VERSION_SHORT}
to it in order to include the current version. -
DISCORD_BOT_TOKEN
: The bot token to use (should look something like:"MTI3NDQ1MzU3ODgxNTI0NjQ1Ng.GunicA.M8NJF5U5rO67b88NA4FioSL5IR-5Dd80ntuuyI"
). -
BOT_ADMIN_USERS
: User IDs that are allowed perform administrative bot actions (you'll probably want to add your own here) (e.g.:["643945264868098049", "1094517382782926858"]
)
-
- You can add
NXEYE_EMOJI
,NSIRP_EMOJI
, andLOOK2_EMOJI
to the environment variables to make the bot use emojis. You can add emojis to a bot fromhttps://discord.com/developers/applications/<app id>/emojis
. Expected values are one or more emojis, obtained from the "copy markdown" button on that page (though it could also just be text). To keep the formatting consistent,NSIRP_EMOJI
should include a>
at the start. - You can add an
aetol
directory to the root, along withparticle_dictionary.tsv
,word_dictionary.tsv
, andidiom_dictionary.tsv
inside of it in order to enable access to the Aetol commands. Particles should have the format:name
,meaning
,as verb
,as noun
,notes
,category
; words should have the format:name
,meaning
,as verb
,as noun
,formation
,category
; and idioms should have the format:name
,meaning
. Including these as a header is also required.
-
(and any dependencies for the above)
Newer versions may be used as long as they are backward compatible. Older versions may have incorrect behaviour or break entirely.