Files
2026-05-28 15:03:33 +01:00

49 lines
1.5 KiB
Markdown

# discord-ledger-bot
## Prerequisites
Python and Git must both be installed system-wide. See instructions for your operating system [here](https://git.greyweather.dev/greyweather/discord-ledger-bot/wiki/Dependency-installation-instructions).
You will also need to register an application in the Discord Developer Portal, you can find instructions for that [here](https://git.greyweather.dev/greyweather/discord-ledger-bot/wiki/Discord-developer-portal-instructions).
## Bot setup instructions
(On Windows, use Git Bash to run these commands, which is installed by 'Git for Windows')
1. Clone this repository:
```
git clone https://git.greyweather.dev/greyweather/discord-ledger-bot.git
```
2. Enter the directory
```
cd discord-ledger-bot
```
3. Create a virtual environment
```
python3 -m venv .
```
4. Install the required libraries
#### Linux:
```
./bin/pip install discord dotenv datetime
```
#### Windows 11:
```
./Scripts/pip.exe install discord dotenv datetime
```
#### Windows 10:
```
./Scripts/pip.exe install discord dotenv datetime pip-system-certs
```
5. Set your Discord application token
```
echo "TOKEN='my-token-here'" > .env
```
Or add a line reading `TOKEN='my-token-here'` to a file named ".env" using a text editor of your choosing (must be next to your "main.py" file)
6. Run the script
#### Linux:
```
./bin/python main.py
```
#### Windows:
```
./Scripts/python.exe main.py
```