- Create an app + bot in the Discord Developer Portal
- Copy the bot token
- Invite the bot to a server you share (Discord generally blocks DMs without a mutual server)
python -m playwright install chromiumpip install -e .
cp .env.example .envEdit .env:
DISCORD_BOT_TOKEN=...
DISCORD_USER_ID=...
GOOFISH_COOKIES_JSON_PATH=./cookies.json
WEBHOOK_HOST=127.0.0.1
WEBHOOK_PORT=8123
WEBHOOK_PATH=/webhook/ai-goofish-monitor
WEBHOOK_SECRET=In Discord, run:
/login qr(scan with the 闲鱼 app)/login status/login export_state(writes./xianyu_state.jsonby default)
Point ai-goofish-monitor to this bot's webhook receiver:
WEBHOOK_URL=http://<this-server>:8123/webhook/ai-goofish-monitor
WEBHOOK_METHOD=POST
WEBHOOK_HEADERS={"X-Webhook-Secret":"<optional secret>"}
WEBHOOK_BODY={"title":"{{title}}","content":"{{content}}"}
WEBHOOK_CONTENT_TYPE=JSONIf WEBHOOK_SECRET is set in this repo, the receiver accepts it either as:
- HTTP header
X-Webhook-Secret: ... - query string
?secret=...