Configuration
Variables d'environnement
Obligatoires
| Variable | Description | Où la trouver |
|---|---|---|
DISCORD_TOKEN | Token du bot | Discord Developer Portal |
DISCORD_CLIENT_ID | Application ID | Même portail, section General |
DISCORD_GUILD_ID | ID du serveur | Clic droit serveur → Copier l'identifiant |
DISCORD_LOG_CHANNEL_ID | Salon logs admin | Créé par /setup init ou manuellement |
BOT_OWNER_ID | Ton Discord user ID | Clic droit sur toi → Copier l'identifiant |
DATABASE_URL | URL PostgreSQL | postgresql://discord_bot:discord_bot@localhost:5432/discord_bot |
Optionnelles
| Variable | Description | Où la trouver |
|---|---|---|
RIOT_API_KEY | API Riot Games (TFT, expire 24h) | developer.riotgames.com |
RIOT_PLATFORM | Plateforme Riot | euw1, na1, kr... |
RIOT_REGION | Région Riot | europe, americas, asia |
ENABLE_VALORANT_TRACKER | Active le module Valorant | true / false |
HENRIK_API_KEY | API HenrikDev (Valorant) | henrikdev.xyz/dashboard |
GROQ_API_KEY | API Groq (IA chat) | console.groq.com |
GITHUB_TOKEN | Token GitHub (bug reports) | github.com/settings/tokens |
GITHUB_REPO | Repo GitHub | owner/repo (ex: alxgb5/igbbot) |
HEALTH_PORT | Port health check HTTP | Défaut : 3000 |
LOG_LEVEL | Niveau de log | debug, info, warn, error |
NODE_ENV | Environnement | development, production, test |
Exemple .env
env
# Discord
DISCORD_TOKEN=OTM1MjU2...
DISCORD_CLIENT_ID=935256885576216626
DISCORD_GUILD_ID=628274535677952031
DISCORD_LOG_CHANNEL_ID=1489184508589904013
BOT_OWNER_ID=267404560274817024
# Database
DATABASE_URL=postgresql://discord_bot:discord_bot@localhost:5432/discord_bot
# Riot Games
RIOT_API_KEY=RGAPI-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RIOT_PLATFORM=euw1
RIOT_REGION=europe
# Valorant
ENABLE_VALORANT_TRACKER=true
HENRIK_API_KEY=HDEV-xxx
# IA
GROQ_API_KEY=gsk_xxx
# GitHub
GITHUB_TOKEN=ghp_xxx
GITHUB_REPO=alxgb5/igbbot
# App
LOG_LEVEL=info
NODE_ENV=developmentSécurité
Ne jamais commiter le .env. Il est dans le .gitignore.
