{"id":28220732,"url":"https://github.com/plnech/paradibot","last_synced_at":"2025-06-10T09:30:47.109Z","repository":{"id":292348263,"uuid":"980609588","full_name":"PLNech/ParadiBot","owner":"PLNech","description":"Serviteur de Cinéma","archived":false,"fork":false,"pushed_at":"2025-05-10T21:37:38.000Z","size":357,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-18T04:16:16.747Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PLNech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2025-05-09T12:13:21.000Z","updated_at":"2025-05-10T21:37:41.000Z","dependencies_parsed_at":"2025-05-09T13:36:31.148Z","dependency_job_id":"b63dfd7a-1f43-4949-85c6-bfb756ab04f5","html_url":"https://github.com/PLNech/ParadiBot","commit_stats":null,"previous_names":["plnech/paradibot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PLNech%2FParadiBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PLNech%2FParadiBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PLNech%2FParadiBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PLNech%2FParadiBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PLNech","download_url":"https://codeload.github.com/PLNech/ParadiBot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PLNech%2FParadiBot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259047894,"owners_count":22797616,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-05-18T04:16:12.584Z","updated_at":"2025-06-10T09:30:47.081Z","avatar_url":"https://github.com/PLNech.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Paradiso Discord Bot\n\nA Discord bot for the Paradiso movie voting system, using Algolia for data storage.\n\n## Features\n\n- Add movies to a voting queue\n- Vote for movies\n- Search for movies by title, actor, director, etc.\n- Find related movies\n- See top voted movies\n- List all movies in the voting queue\n\n## Requirements\n\n- Python 3.9+\n- discord.py\n- python-dotenv\n- algoliasearch\n- requests\n- pytest (for testing)\n\n## Installation\n\n1. Clone this repository\n2. Set up a virtual environment (recommended):\n   ```bash\n   python -m venv venv\n   source venv/bin/activate  # On Windows: venv\\Scripts\\activate\n   ```\n3. Install dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n4. Create a `.env` file based on `.env-example`\n5. Create an Algolia account and set up indices:\n   - Create an application in Algolia\n   - Create two indices: `paradiso_movies` and `paradiso_votes`\n\n## Configuration\n\nCreate a `.env` file in the project root with the following variables:\n\n```\n# Discord Bot Configuration\nDISCORD_TOKEN=your_discord_bot_token_here\n\n# Algolia Configuration\nALGOLIA_APP_ID=your_algolia_app_id_here\nALGOLIA_API_KEY=your_algolia_api_key_here\nALGOLIA_MOVIES_INDEX=paradiso_movies\nALGOLIA_VOTES_INDEX=paradiso_votes\n```\n\n## Running the Bot\n\nStart the bot with:\n\n```bash\npython paradiso_bot.py\n```\n\n## Running Tests\n\nRun the tests with:\n\n```bash\npython run_tests.py\n```\n\nOr using pytest directly:\n\n```bash\npytest test/\n```\n\n## Setting up as a Service on Debian\n\n1. Create a systemd service file:\n   ```bash\n   sudo nano /etc/systemd/system/paradiso-bot.service\n   ```\n\n2. Add the following content:\n   ```\n   [Unit]\n   Description=Paradiso Discord Bot\n   After=network.target\n\n   [Service]\n   User=your_username\n   Group=your_group\n   WorkingDirectory=/path/to/bot\n   ExecStart=/path/to/python /path/to/bot/paradiso_bot.py\n   Restart=on-failure\n   RestartSec=5\n   Environment=PYTHONUNBUFFERED=1\n\n   [Install]\n   WantedBy=multi-user.target\n   ```\n\n3. Reload systemd, enable and start the service:\n   ```bash\n   sudo systemctl daemon-reload\n   sudo systemctl enable paradiso-bot\n   sudo systemctl start paradiso-bot\n   ```\n\n4. Check the status:\n   ```bash\n   sudo systemctl status paradiso-bot\n   ```\n\n## Bot Commands\n\n- `/add [title]` - Add a movie to the voting queue\n- `/vote [title]` - Vote for a movie\n- `/movies` - List all movies in the voting queue\n- `/search [query]` - Search for movies by title, actor, director, etc.\n- `/related [query]` - Find movies related to a specific movie\n- `/top [count]` - Show the top voted movies (default: top 5)\n- `/help` - Show help for all commands\n\n## Development\n\n### Project Structure\n\n- `paradiso_bot.py` - Main bot script\n- `test/` - Unit tests\n  - `test_bot.py` - Basic bot tests\n  - `test_commands.py` - Command tests\n  - `test_algolia.py` - Algolia integration tests\n- `requirements.txt` - Dependencies\n\n### Testing\n\nThe project follows a Test-Driven Development (TDD) approach. Tests are written for all key functionality.\n\nTo run the tests with coverage report:\n\n```bash\npytest --cov=paradiso_bot test/\n```\n\n## Troubleshooting\n\n- **Discord commands not appearing:** Try running `/help` or restart the bot to force sync commands\n- **Algolia errors:** Check your API keys and indices names in the `.env` file\n- **Import errors:** Make sure all dependencies are installed correctly\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplnech%2Fparadibot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplnech%2Fparadibot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplnech%2Fparadibot/lists"}