feat: initial project setup — Vision Studio bot
Some checks failed
CI / lint (push) Failing after 2s
CI / test (push) Failing after 1s

- Python 3.12 + discord.py
- Docker + docker-compose
- Forgejo Actions CI (lint + test)
- Cog system with /hello example
- deploy.sh for auto-deployment
This commit is contained in:
Mathis 2026-09-19 12:11:06 +02:00
commit e44349cea9
17 changed files with 396 additions and 0 deletions

41
vision.py Normal file
View file

@ -0,0 +1,41 @@
import asyncio
import logging
import sys
from dotenv import load_dotenv
load_dotenv()
import config
from bot import VisionBot
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s | %(levelname)-8s | %(name)s — %(message)s",
datefmt="%Y-%m-%d %H:%M:%S",
handlers=[
logging.StreamHandler(sys.stdout),
logging.FileHandler(config.LOGS_DIR / "vision.log", encoding="utf-8"),
],
)
logger = logging.getLogger("vision")
async def main():
if not config.DISCORD_TOKEN:
logger.critical("DISCORD_TOKEN manquant dans .env")
sys.exit(1)
logger.info("Lancement de Vision Studio...")
bot = VisionBot()
try:
await bot.start(config.DISCORD_TOKEN)
except KeyboardInterrupt:
logger.info("Arrêt demandé")
except Exception as e:
logger.critical(f"Erreur fatale : {e}", exc_info=True)
if __name__ == "__main__":
asyncio.run(main())