[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-109920":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":12,"contributorsCount":12,"subscribersCount":12,"size":12,"stars1d":14,"stars7d":15,"stars30d":16,"stars90d":12,"forks30d":12,"starsTrendScore":17,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":9,"pushedAt":28,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":12,"starSnapshotCount":12,"syncStatus":32,"lastSyncTime":33,"discoverSource":34},109920,"footballbot","Juan-Miguel-alvarado\u002Ffootballbot","Juan-Miguel-alvarado","Discord bot for football fans: crest trivia, live scores and standings.",null,"Python",106,0,66,4,15,40,14,56.5,false,"main",true,[23,24,25,26,27],"discord-bot","discord-py","football","python","trivia","2026-11-11 15:33:03","2026-11-23 19:45:34","# FootballBot\n\nA Discord bot about football: **live league information** (matches, standings, team profiles) and **image trivia** in the style of country-flag quiz bots, but with club crests: guess the club from a pixelated crest, a silhouette or a zoomed-in piece, the country of a club, the national team from its flag, and more.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fpreview.gif\" alt=\"FootballBot preview: trivia rounds, answer cards, podium, standings and team cards\" width=\"560\">\n\u003C\u002Fp>\n\n\u003Csub>The preview shows the real images the bot sends, made with real data by \u003Ccode>scripts\u002Fmake_preview.py\u003C\u002Fcode>.\u003C\u002Fsub>\n\n> **Status:** the MVP (Phases 0-2) is done, plus the crest and flag modes of Phase 3 and the image cards of Phase 4, all in the bot's own look. Next: player trivia, alerts and running it 24\u002F7. See [ROADMAP.md](ROADMAP.md).\n\n---\n\n## What it does\n\n### Football info\n| Command | What you get |\n|---|---|\n| `\u002Fmatches [league] [date]` | The day's matches in one compact message, a section per league, winners in bold |\n| `\u002Flive [league]` | Matches being played right now (free data is a few minutes behind) |\n| `\u002Fstandings \u003Cleague>` | **Image card** of the table: crests, positions colored by zone (Champions League, relegation...) and the leader on top |\n| `\u002Fteam \u003Cteam>` | **Image card**: crest, stadium, coach, W\u002FD\u002FL form, last result and the next match as a \"versus\", plus a link to the club's website |\n| `\u002Fleagues` | The 13 supported competitions and their codes |\n\nLeagues, teams and dates have autocomplete. Data covers the 13 competitions of football-data.org's free plan: the top 5 European leagues, Eredivisie, Primeira Liga, Championship, Brasileirão, Champions League, Copa Libertadores, World Cup and Euro.\n\n### Trivia\n`\u002Ftrivia start \u003Cmode> [difficulty] [rounds] [answers]` starts a game in the channel. The image gets clearer every 5 seconds; answering earlier gives more points (100 \u002F 75 \u002F 50 \u002F 25), and winning rounds in a row adds a streak bonus.\n\n| Mode | You see | You guess |\n|---|---|---|\n| Pixelated crest | A pixelated crest | The club |\n| Blurred crest | A blurred crest | The club |\n| Silhouette | The crest filled in blue (its colors fade in) | The club |\n| Zoomed crest | A small piece of the crest that zooms out | The club |\n| Club country | A crest | Its country (buttons with flags) |\n| Flags | A pixelated flag | The national team |\n| League logo | A pixelated league logo | The competition |\n| Mix | A different crest mode each round | The club |\n\n- **Answers:** 4 buttons, or typed in the chat (accents, typos and nicknames like `barca`, `atleti` or `spurs` all count).\n- **Difficulty:** easy (top 5 leagues), medium (more European and Brazilian clubs), hard (Championship and Libertadores too).\n- **No repeats:** each server remembers which crests already came up, so you don't see the same one until all of them have.\n- Each round is an image card with the question and the points still up for grabs; the answer is revealed on another card with the club, its country and league, and who got it.\n- `\u002Ftrivia hint` gives a private hint (costs points), `\u002Ftrivia stop` ends the game, and every game ends with a **podium** with the players' avatars.\n- `\u002Fleaderboard [mode]`: the server ranking as an image card.\n\n### Utilities\n`\u002Fhelp` (commands by category, `\u002Fhelp \u003Ccommand>` for its options) and `\u002Fping` (Discord latency, football API status and quota).\n\nThe full catalog, including what is planned, is in [COMMANDS.md](COMMANDS.md).\n\n---\n\n## Look\n\nEverything the bot sends follows its logo: a blue ball breaking into fragments on black.\n\n- **Cards** (standings, team, trivia rounds, answers, podium, leaderboard) are drawn by the bot with Pillow: flat black, one electric blue (`#0B96FE`), square corners, the logo as a mark in the header and its fragments as decoration.\n- **Crests are stickers**: a light outline that follows their shape, so dark crests (Juventus, Newcastle) still show on black.\n- **Text is sized for phones**, where Discord shrinks images to about 400 px wide.\n- **Messages** use the same blue, keep emojis to flags and a few status marks, and never repeat what the image already shows. Cards go out as plain images (Discord shows them bigger), times are Discord timestamps (everyone sees their own timezone), commands are clickable, and dead ends get a button (next day, today's matches, play again).\n\nTo change the look, start with the palette at the top of [`footballbot\u002Fimaging\u002Fdraw.py`](footballbot\u002Fimaging\u002Fdraw.py); [GUIA.md](GUIA.md) explains where each card lives.\n\n---\n\n## Stack\n\n| Part | Technology |\n|---|---|\n| Main language | **Python 3.12+** |\n| Discord | [`discord.py`](https:\u002F\u002Fdiscordpy.readthedocs.io\u002F) 2.x (slash commands, buttons, select menus, autocomplete) |\n| HTTP | `httpx` (async) |\n| Images | `Pillow` with the free Inter and Oswald fonts, styled after the bot's logo |\n| Database | SQLite with `aiosqlite` (numbered migrations), PostgreSQL if it grows |\n| Answer matching | `rapidfuzz` + `unidecode` |\n| Config | `.env` + `pydantic-settings` |\n| Quality | `ruff`, `pytest`, GitHub Actions |\n| Extra (optional) | JS\u002FTS for a web leaderboard dashboard later on |\n\nData sources, all free (see [APIS.md](APIS.md)): **football-data.org** (matches, tables, teams, crests) and **flagcdn** (flags) today; **TheSportsDB** and **Wikidata** come in with the player modes.\n\n---\n\n## Documents\n\n| File | Purpose |\n|---|---|\n| [README.md](README.md) | This overview |\n| [GUIA.md](GUIA.md) | **Code guide (Spanish)**: where everything is and how a command flows through the bot. Start here before touching the code |\n| [ROADMAP.md](ROADMAP.md) | Phases, tasks and work areas to split between us |\n| [ARCHITECTURE.md](ARCHITECTURE.md) | How the bot is built internally: folders, data, images |\n| [APIS.md](APIS.md) | Free APIs we use, their limits and sign-up links |\n| [COMMANDS.md](COMMANDS.md) | Catalog of every command and trivia mode |\n| [CONTRIBUTING.md](CONTRIBUTING.md) | Team rules: branches, commits, PRs, code style |\n\n---\n\n## Getting started\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FJuan-Miguel-alvarado\u002FFootballBot.git && cd FootballBot\npython -m venv .venv && source .venv\u002Fbin\u002Factivate\npip install -e \".[dev]\"\ncp .env.example .env      # then fill in the keys\npython -m footballbot\n```\n\nEnvironment variables (all documented in [.env.example](.env.example)):\n\n```env\nDISCORD_TOKEN=\nDISCORD_DEV_GUILD_ID=        # test server: slash commands sync instantly there\nDISCORD_ERRORS_CHANNEL_ID=   # optional: channel that receives error tracebacks\nFOOTBALL_DATA_KEY=\nTHESPORTSDB_KEY=123          # public free key\nDATABASE_URL=sqlite:\u002F\u002F\u002Fdata\u002Ffootballbot.db\nTRIVIA_TYPED_ANSWERS=false  # true only after enabling the Message Content intent\nTIMEZONE=America\u002FBogota      # \"today\" and kick-off times\nLOG_LEVEL=INFO\n```\n\nChecks (the same ones CI runs on every PR):\n\n```bash\nruff check . && ruff format --check .\npytest\n```\n\nScripts:\n\n```bash\npython scripts\u002Fbuild_dataset.py   # rebuild the trivia clubs and league logos (each season)\npython scripts\u002Fmake_preview.py    # regenerate docs\u002Fpreview.gif after changing the card design\n```\n\n> Never commit `.env` or the bot token. If a token leaks, regenerate it in the Discord Developer Portal immediately.\n\n---\n\n## Disclaimer\n\nCrests, logos and player photos are trademarks\u002Fproperty of their owners. This is a **non-commercial** project among friends; images are only used for the trivia games and are cached from the APIs, not redistributed.\n","FootballBot 是一个面向足球爱好者的 Discord 机器人，提供实时赛事数据查询与视觉化问答游戏。核心功能包括：通过指令获取指定联赛的实时比分、积分榜（以带颜色分区和队徽的图片卡片呈现）、球队资料（含主场、教练、近期赛果等）；支持多种图像谜题模式，如像素化\u002F剪影\u002F局部放大俱乐部队徽、国旗、联赛标识等，结合倒计时抢答与智能答案匹配（支持昵称、拼写容错）。基于 Python 和 discord.py 开发，数据源为 football-data.org 免费 API，覆盖欧洲五大联赛、南美解放者杯、世界杯等13项主流赛事。适用于足球社群运营、Discord 球迷服务器互动娱乐及轻量级体育知识科普场景。",2,"2026-11-24 04:37:53","CREATED_QUERY"]