How staciax/valorant-discord-bot works
Project type and purpose
• This is an open‑source Discord bot written in Python, designed to surface VALORANT data (store, night market, battlepass, missions, bundles, notifications) inside Discord.
• It leverages Discord.py for the Discord Gateway and a custom Valorant API client (based on HeyM1ke’s ValorantClientAPI and valclient.py) to fetch and cache in‑game data.
File structure
• Top‑level bootstrap:
– bot.py / main.py: entrypoints that load environment variables, configure the Discord client, and register Cogs.
– pyproject.toml: dependency and build config.
– Docker files and GitHub Actions workflows: CI/CD and containerization.
• “cogs” folder: each file (admin.py, notify.py, valorant.py, errors.py) implements a set of slash commands or event listeners following Discord.py’s Cog pattern.
• “utils” folder:
– checks.py, errors.py: reusable decorators and exception handlers for command validation.
– locale_v2.py + languages/*.json: full i18n/l10n support.
– utils/valorant: modular API wrapper with subcomponents for auth, caching, database persistence, endpoints, embed generation, and views.
• “resources”: static screenshots and images for documentation.
• Configuration and environment management: .env.example, .gitignore, .python-version.
README for additional insights
• Confirms use of slash commands (/store, /battlepass, /notify, etc.), global vs. guild syncing, and custom emoji injection.
• Highlights dependency on external services: Discord Gateway, Riot’s in‑game API, Valorant‑API.com for assets, Crowdin for translations.
• Mentions a scheduled “notify” feature that watches for skin availability and pushes messages.