feat(env): load dotenv in entrypoint; add .env.example; stop tracking .env files

This commit is contained in:
2025-10-04 18:05:41 -05:00
parent 84c39fac83
commit e005702480
4 changed files with 46 additions and 0 deletions

42
.env.example Normal file
View File

@@ -0,0 +1,42 @@
# Copy this file to .env for local development. Do not commit your real .env.
# Heroku: set these in Config Vars; dotenv is a no-op in production.
# Discord bot
TOKEN=
MODE=Normal
# Caching and sweepers
CACHE_MESSAGES_LIMIT=50
CACHE_MEMBERS_LIMIT=100
SWEEP_MESSAGES_INTERVAL_SECONDS=300
SWEEP_MESSAGES_LIFETIME_SECONDS=900
# Logging and diagnostics
LOG_LEVEL=info
PRISMA_LOG_QUERIES=0
MEMORY_LOG_INTERVAL_SECONDS=0
ENABLE_MEMORY_OPTIMIZER=false
# Redis connection
REDIS_URL=
REDIS_PASS=
# Appwrite (for reminders)
APPWRITE_ENDPOINT=
APPWRITE_PROJECT_ID=
APPWRITE_API_KEY=
# Reminders
REMINDERS_POLL_INTERVAL_SECONDS=30
# Google AI / Gemini
GOOGLE_AI_API_KEY=
GEMINI_API_KEY=
GENAI_IMAGE_MODEL=
# Slash command registration context
# Your Discord Application ID
CLIENT=
# Test guild ID (for per-guild command registration)
guildTest=

1
package-lock.json generated
View File

@@ -16,6 +16,7 @@
"chrono-node": "2.9.0",
"discord-api-types": "0.38.26",
"discord.js": "15.0.0-dev.1759363313-f510b5ffa",
"dotenv": "16.6.1",
"node-appwrite": "19.1.0",
"pino": "9.13.0",
"prisma": "6.16.2",

View File

@@ -26,6 +26,7 @@
"chrono-node": "2.9.0",
"discord-api-types": "0.38.26",
"discord.js": "15.0.0-dev.1759363313-f510b5ffa",
"dotenv": "16.6.1",
"node-appwrite": "19.1.0",
"pino": "9.13.0",
"prisma": "6.16.2",

View File

@@ -1,3 +1,5 @@
import "dotenv/config";
import Amayo from "./core/client";
import { loadCommands } from "./core/loaders/loader";
import { loadEvents } from "./core/loaders/loaderEvents";