- The application can be set up using Python's virtual environment feature, with dependencies listed in
requirements.txt
.
- Set up a Python Virtual Environment:
- Ensure you're using Python 3.5 or later.
- Execute the following commands:
python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt
Important: Ensure that a file named keys.py
exists in the project root. This file will store credentials for various networks (e.g., Discord, Twitch, etc.).
discord_token = "your-discord-token"
discord_app_id = "your-discord-application-id"
twitch_client_id = "your-twitch-client-id"
twitch_client_secret = "your-twitch-client-secret"
- Create a Discord Application:
- Visit Discord Developer Portal.
- Copy the "Client ID" and "Token" into your
keys.py
.
- Generate an Invitation Link:
- Run the bot with the
--newbot
option to get an invitation link for your server:
python j4ne.py --newbot
- Run the bot with the
- First-Time Setup:
- On your first run, use the following options:
python j4ne.py --mktables
- Network-Specific Configuration:
- To disable a network, pass an argument like
--twitter=False
when launching:
python j4ne.py --twitter=False
- To disable a network, pass an argument like
Static files (e.g., GIFs, customized CSS) are stored in the /static
directory:
- Images for reactions (e.g.,
anneLewd4.gif
,lul.PNG
). - Libraries such as
moment.2.13.0.min.js
.
- The bot uses SQLite by default:
- The database is located in
database.db
.
- The database is located in
- Migrations or updates can be handled via
db.py
.
api/
: REST API handlers.chatters/
,commands/
: Chat functionality.networks/
,static/
,templates/
: Integrations and assets.tests/
: Unit tests.
To start the bot, run:
python j4ne.py
You can execute different modules/features using subcommands:
- Chat Loop:
python j4ne.py chat
- Greet:
python j4ne.py greet <NAME>
- Kanban Board Web App:
Access the app at
python j4ne.py web
http://localhost:8000/
.