{"id":25010872,"url":"https://github.com/dmcp89/harambot","last_synced_at":"2025-03-16T19:15:19.639Z","repository":{"id":45326437,"uuid":"198319634","full_name":"DMcP89/harambot","owner":"DMcP89","description":"A Yahoo Fantasy Sports bot for Discord","archived":false,"fork":false,"pushed_at":"2024-09-17T05:10:52.000Z","size":7073,"stargazers_count":30,"open_issues_count":7,"forks_count":17,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-09-17T07:59:58.732Z","etag":null,"topics":["bot","discord","fantasy-sports","python","yahoo-fantasy-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DMcP89.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","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},"funding":{"github":["DMcP89"],"patreon":null,"open_collective":null,"ko_fi":"davemcpherson","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null}},"created_at":"2019-07-23T00:08:36.000Z","updated_at":"2024-09-06T03:19:13.000Z","dependencies_parsed_at":"2023-02-13T05:31:03.911Z","dependency_job_id":"58806c62-1e7e-4c61-904a-9a0e97e0d89d","html_url":"https://github.com/DMcP89/harambot","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DMcP89%2Fharambot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DMcP89%2Fharambot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DMcP89%2Fharambot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DMcP89%2Fharambot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DMcP89","download_url":"https://codeload.github.com/DMcP89/harambot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243918628,"owners_count":20368745,"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":["bot","discord","fantasy-sports","python","yahoo-fantasy-api"],"created_at":"2025-02-05T04:54:43.468Z","updated_at":"2025-03-16T19:15:19.617Z","avatar_url":"https://github.com/DMcP89.png","language":"Python","funding_links":["https://github.com/sponsors/DMcP89","https://ko-fi.com/davemcpherson"],"categories":[],"sub_categories":[],"readme":"![harambot-banner](https://raw.githubusercontent.com/DMcP89/harambot/main/assests/harambot_banner.png)\n# Harambot\n_An interactive Yahoo Fantasy sports bot for Discord._\n\n![Python](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10-blue) ![License](https://img.shields.io/badge/License-MIT-green) ![Build](https://img.shields.io/github/actions/workflow/status/DMcP89/harambot/unit-tests.yml?branch=main) ![Version](https://img.shields.io/badge/version-0.4.4--Beta-red)\n\n\n\n\n\n[![Discord](https://img.shields.io/badge/Add_Harambot_To_Your_Server-%235865F2.svg?style=for-the-badge\u0026logo=discord\u0026logoColor=white)](http://harambot.io)\n\n\n\n\n\n## Commands\n    /ping                           - Gives the latency of harambot\n    /RIP                            - Pay respects\n    /standings                      - Returns the current standings of the current league\n    /roster Team                    - Returns the roster of the given team\n    /stats Player                   - Returns the details of the given player\n    /trade                          - Create a poll for latest trade for league approval\n    /matchups week                  - Returns the matchups for the given week, defaults to the current week\n    /waiver days                    - Returns the waiver wire transactions from the previous number of days\n    /configure                      - Configure the bot for your guild\n    /reports                        - Set what channel transaction reports should be sent to.\n\nYou can find example output of these commands [here](https://github.com/DMcP89/harambot/wiki#command-examples)\n\n\n## Roll your own instance\n\n### Prerequisites\n\nIn order to properly configure your bot you will need the following:\n\n* [Discord API Token](https://github.com/DMcP89/harambot/wiki/Prerequisites#discord-api-token)\n* [Yahoo API Client Id \u0026 Secret](https://github.com/DMcP89/harambot/wiki/Prerequisites#yahoo-api-client-id--secret)\n* [Yahoo League ID](https://github.com/DMcP89/harambot/wiki/Prerequisites#yahoo-league-id)\n\n_Visit our [wiki](https://github.com/DMcP89/harambot/wiki) for a step by step guide on how to obtain these values._\n\n#### Generate a key for your local database\n\nParts of the database are encrypted, which means we need to generate a key. Using the python interactive interpreter, you can generate one by running these three lines inside the interpreter:\n\n```\nfrom cryptography.fernet import Fernet\nfernet_key = Fernet.generate_key()\nprint(fernet_key.decode())\n```\n\nYour key will appear below.\n\n### Run the bot on [Render](https://render.com/)\n\n[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/DMcP89/harambot)\n\n### Run the bot locally using pip package\n\n1. Install the harambot package using pip\n\n        pip install harambot\n\n2. Export the following environment variables\n\n   ```\n   export DISCORD_TOKEN='[YOUR DISCORD TOKEN]'\n   export YAHOO_KEY='[YOUR YAHOO API CLIENT ID]'\n   export YAHOO_SECRET='[YOUR YAHOO API CLIENT SECRET]'\n   export DATABASE_URL='[YOUR DATABASE URL]' # which can be a pathway to a file, such as 'sqllite:///harambot.db'\n   export HARAMBOT_KEY='[YOUR ENCRYPTION KEY]' # A URL-safe base64-encoded 32-byte key\n   ```\n\n3. Run the bot\n\n        harambot\n\n### Run the bot locally using docker\n\n1. Pull the latest image from docker hub\n\n        docker pull dmcp89/harambot\n\n2. Export the following environment variables\n\n   ```\n   export DISCORD_TOKEN='[YOUR DISCORD TOKEN]'\n   export YAHOO_KEY='[YOUR YAHOO API CLIENT ID]'\n   export YAHOO_SECRET='[YOUR YAHOO API CLIENT SECRET]'\n   export DATABASE_URL='[YOUR DATABASE URL]'\n   export HARAMBOT_KEY='[YOUR ENCRYPTION KEY]' # A URL-safe base64-encoded 32-byte key\n   ```\n\n3. Run the bot\n\n        docker run --name harambot \\\n        -e DISCORD_TOKEN=$DISCORD_TOKEN \\\n        -e YAHOO_KEY=$YAHOO_KEY \\\n        -e YAHOO_SECRET=$YAHOO_SECRET \\\n        -e DATABASE_URL=$DATABASE_URL \\\n        -e HARAMBOT_KEY=$HARAMBOT_KEY \\\n        --rm dmcp89/harambot\n\n\n## Setup\n\n### Add the bot to your guild\n1. Generate a OAuth url from the discord developer portal using the bot scope and the following permissions:\n\n* Send Messages\n* Send Messages in Threads\n* Embed Links\n* Attach Files\n* Read Message History\n* Add Reactions\n* Use Slash Commands\n* Manage WebHooks\n\nThe permission value should be 277562378304\n\n![discord-oauth](https://raw.githubusercontent.com/DMcP89/harambot/main/assests/discord-oauth-generator.png)\n\n2. Navigate to the generated url in a web browser and authorize the bot for your guild\n\n![discord-oauth-url-1](https://raw.githubusercontent.com/DMcP89/harambot/main/assests/discord-oauth-url-authorize-1.png)\n![discord-oauth-url-2](https://raw.githubusercontent.com/DMcP89/harambot/main/assests/discord-oauth-url-authorize-2.png)\n\n### Configure your guild\n\n* Once your bot is added to your guild you can configure it by using the /configure command:\n\n\n![discord-config-commnd](https://raw.githubusercontent.com/DMcP89/harambot/main/assests/harambot_configure_1.png)\n\n* Use the Login with Yahoo button to authenticate with Yahoo and get your Yahoo token (this is a one time token)\n\n\n![discord-config-yahoo](https://raw.githubusercontent.com/DMcP89/harambot/main/assests/harambot_configure_4.png)\n\n* Use the Configure Guild button to configure your guild for the bot\n\n\n![discord-config-guild](https://raw.githubusercontent.com/DMcP89/harambot/main/assests/harambot_configure_2.png)\n\n\n* You can reconfigure your guild by running the configure command and clicking the Configure Guild button.\n\n\n![discord-config-guild](https://raw.githubusercontent.com/DMcP89/harambot/main/assests/harambot_configure_3.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmcp89%2Fharambot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmcp89%2Fharambot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmcp89%2Fharambot/lists"}