{"id":26613414,"url":"https://github.com/daniloreddy/coffybot","last_synced_at":"2026-05-15T13:06:14.081Z","repository":{"id":283497965,"uuid":"951525654","full_name":"daniloreddy/CoffyBot","owner":"daniloreddy","description":"A discord bot entirely written by ChatGPT with HuMaN(me) supervision","archived":false,"fork":false,"pushed_at":"2025-05-14T20:19:55.000Z","size":200,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-07T08:43:59.498Z","etag":null,"topics":["bot","discord"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daniloreddy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-19T20:21:55.000Z","updated_at":"2025-05-14T20:19:58.000Z","dependencies_parsed_at":"2025-05-14T21:37:02.022Z","dependency_job_id":null,"html_url":"https://github.com/daniloreddy/CoffyBot","commit_stats":null,"previous_names":["daniloreddy/coffybot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/daniloreddy/CoffyBot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniloreddy%2FCoffyBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniloreddy%2FCoffyBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniloreddy%2FCoffyBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniloreddy%2FCoffyBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daniloreddy","download_url":"https://codeload.github.com/daniloreddy/CoffyBot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniloreddy%2FCoffyBot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33067506,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","discord"],"created_at":"2025-03-24T04:24:40.114Z","updated_at":"2026-05-15T13:06:14.052Z","avatar_url":"https://github.com/daniloreddy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Coffy Bot (Discord + Telegram)\n\n**Coffy** is a private multi-platform bot powered by Google Gemini.  \nIt supports both **Discord** and **Telegram**, offering AI-powered chat, Wikipedia search, weather forecast, TTS audio, and powerful admin tools for context management, logs and stats.\n\n---\n\n## 🚀 Features\n\n- 🤖 Chat with Google Gemini (`/chatty`)\n- 🌍 Weather forecast from OpenWeather\n- 📚 Wikipedia search\n- 🔊 Text-to-Speech audio (Google TTS)\n- 🔒 Localized command restriction (e.g. DM-only, admin-only)\n- 🛠️ Advanced admin commands (context, models, stats, logs)\n\n\u003e ❌ **Image generation** has been removed due to quality and reliability issues.\n\n---\n\n## 📦 Project Structure\n\n```\n/bot_launcher.py        # Main launcher (runs Discord, Telegram or both)\n/bot_discord.py         # Discord bot entry point\n/bot_telegram.py        # Telegram bot entry point\n\n/cogs/                  # Discord command modules (slash commands)\n/telegram_commands/     # Telegram command modules\n\n/utils/                 # Config, logging, localization, context utils\n/services/              # External API integrations (Gemini, TTS, etc.)\n/core/                  # Central logic handler\n\n/tools/                 # Extra utilities (DB checker, translation keys)\n/lang/                  # Localized strings (e.g., en.json, it.json)\n/logs/                  # Logs for bot, services, errors\n/prompts/               # Custom context files\n```\n\n---\n\n## ⚙️ Setup Guide\n\n1. Create a `.env` file in the root directory with your API keys:\n```\nDISCORD_BOT_TOKEN=your_discord_bot_token\nTELEGRAM_BOT_TOKEN=your_telegram_bot_token\nGEMINI_API_KEY=your_google_gemini_api_key\nOPENWEATHER_API_KEY=your_openweather_api_key\n\nDISCORD_FALLBACK_ID=your_discord_user_id\nTELEGRAM_FALLBACK_ID=your_telegram_username\n```\n\n2. Create and activate the virtual environment:\n```bash\npython -m venv coffy-env\nsource coffy-env/bin/activate  # On Windows: coffy-env\\Scripts\\activate\n```\n\n3. Install the required dependencies:\n```bash\npip install -r requirements.txt\n```\n\n4. Launch the bot(s) using the unified launcher:\n```bash\npython bot_launcher.py discord         # Start Discord bot only\npython bot_launcher.py telegram        # Start Telegram bot only\npython bot_launcher.py discord telegram  # Start both\n```\n\n---\n\n## 🌐 Localization\n\nAll bot messages are fully localized using JSON language files in `/lang/`.  \nLanguages supported: **English (en)** and **Italian (it)**.  \nAdd new languages via additional files like `fr.json`, `de.json`, etc.\n\nUse:\n```bash\npython tools/key_verification_tool.py\n```\nto check for missing or unused keys.\n\n---\n\n## 📊 Logging\n\nLog files are saved in the `/logs/` folder:\n\n- `bot.log` → Events and commands\n- `services.log` → External API usage\n- `errors.log` → Errors and exceptions\n\nEach log is timestamped and auto-rotated.\n\n---\n\n## 🧠 Context System\n\nEach Discord server or Telegram group can define a custom **context prompt** stored in `/prompts/`.  \nIt will be prepended to every user query sent to Gemini.\n\nAdmins can set or reset contexts using:\n- `/chatty-admin-context`\n- `/chatty-admin-context-reset`\n\n---\n\n## 🛠️ Admin Commands\n\nCommands available via **DM only** (Telegram: by fallback username):\n\n- `/chatty-admin-model` ➜ Switch Gemini model\n- `/chatty-admin-models` ➜ List available models\n- `/chatty-admin-context` ➜ Set server context\n- `/chatty-admin-context-reset` ➜ Reset server context\n- `/chatty-admin-contexts` ➜ List available contexts\n- `/chatty-admin-stats` ➜ Show usage statistics\n- `/chatty-admin-activity` ➜ Daily usage stats\n- `/chatty-admin-lastlogs` ➜ Show last 10 prompts\n- `/chatty-admin-help` ➜ Show help for admin commands\n\n---\n\n## 🤖 Telegram Command Mapping\n\nTelegram does not support dashes (`-`) in command names, so all Discord commands are mapped with underscores (`_`):\n\n| Discord Command        | Telegram Command          |\n|------------------------|---------------------------|\n| `/chatty`              | `/chatty`                |\n| `/chatty-help`         | `/chatty_help`           |\n| `/chatty-info`         | `/chatty_info`           |\n| `/chatty-meteo`        | `/chatty_meteo`          |\n| `/chatty-tts`          | `/chatty_tts`            |\n| `/chatty-wiki`         | `/chatty_wiki`           |\n| `/chatty-admin-*`      | `/chatty_admin_*`        |\n\n---\n\n## 📬 Contact\n\nDeveloped by OpenAI ChatGPT with supervision of DaniloReddy.  \nFor issues or requests, contact me directly.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniloreddy%2Fcoffybot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaniloreddy%2Fcoffybot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniloreddy%2Fcoffybot/lists"}