The wikipaedia discord server bot
- Python 100%
| cogs | ||
| .gitignore | ||
| LICENSE.md | ||
| main.py | ||
| README.md | ||
| requirements.txt | ||
| restarting.txt | ||
| tools.py | ||
| util_ansi.py | ||
Configuration
the config json looks like this
{
"BOT_TOKEN": "discordbottokenhere",
"TOGETHER_API_KEY": "togetherapikeyhere",
"TOGETHER_MODEL": "meta-llama/Llama-3.3-70B-Instruct-Turbo",
"FORGEJO_WEBHOOK_CHANNEL_ID": 123456789012345678,
"FORGEJO_WEBHOOK_SECRET": "insertyosecrethere",
"FORGEJO_WEBHOOK_HOST": "0.0.0.0",
"FORGEJO_WEBHOOK_PORT": 8080,
"FORGEJO_WEBHOOK_PATH": "/forgejo/webhook"
}
Installlation
if ur using conda:
conda create -n wikipe python
conda activate wikipe
pip install -r requirements.txt
if venv:
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
and to run the bot:
python main.py
Permissions
give the bot message-content intent enabled
Bridging
Forgejo webhook crap:
- Set
FORGEJO_WEBHOOK_CHANNEL_IDinconfig.json - Add a Forgejo webhook in the repository settings
- Use webhook type
Forgejo, methodPOST, and content typeapplication/json - Set the target URL to your public bot URL plus
FORGEJO_WEBHOOK_PATH, for examplehttps://example.com/forgejo/webhook - Put the same secret in Forgejo and
FORGEJO_WEBHOOK_SECRET - Enable push, branch, and tag events