{"id":17919237,"url":"https://github.com/fastestmolasses/leetcodediscordbot","last_synced_at":"2025-04-03T08:25:37.747Z","repository":{"id":45206162,"uuid":"513411773","full_name":"FastestMolasses/LeetcodeDiscordBot","owner":"FastestMolasses","description":"Sends daily problem to a Discord channel.","archived":false,"fork":false,"pushed_at":"2022-09-20T22:21:51.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T04:40:11.678Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FastestMolasses.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}},"created_at":"2022-07-13T06:49:14.000Z","updated_at":"2022-07-22T00:34:17.000Z","dependencies_parsed_at":"2023-01-18T17:15:57.377Z","dependency_job_id":null,"html_url":"https://github.com/FastestMolasses/LeetcodeDiscordBot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FastestMolasses%2FLeetcodeDiscordBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FastestMolasses%2FLeetcodeDiscordBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FastestMolasses%2FLeetcodeDiscordBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FastestMolasses%2FLeetcodeDiscordBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FastestMolasses","download_url":"https://codeload.github.com/FastestMolasses/LeetcodeDiscordBot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246963563,"owners_count":20861506,"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":"2024-10-28T20:15:36.866Z","updated_at":"2025-04-03T08:25:37.714Z","avatar_url":"https://github.com/FastestMolasses.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Leetcode Discord Bot\n\nSends daily problem to a Discord channel. Tested on Python 3.10.\n\n![python](https://github.com/FastestMolasses/LeetcodeDiscordBot/actions/workflows/main.yaml/badge.svg)\n\n## Installation\n\n1. Setup a Python environment\n\n    ```bash\n    $ python -m venv env\n    ```\n\n2. In VSCode, make sure you set this environment as the default Python interpreter. This can also be done by pressing `cmd/ctrl + shift + P` and typing \"\u003ePython: Select Interpreter\", then selecting the newly created environment `./env/bin/python`\n\n3. Enter the environment if you haven't already\n\n    ```bash\n    # macOS\n    $ source env/bin/activate\n    # windows\n    $ .\\env\\Scripts\\activate\n    ```\n\n4. Install requirements\n\n    ```bash\n    $ pip install -r requirements.txt\n    ```\n\n5. Rename `.env.sample` to `.env` and fill out the required credentials\n\n6. Run bot.py for the discord bot, or webhook.py to send a webhook. The webhook.py script can be used in a cron job.\n\n## Setting up Terraform and AWS\n\n1. Create a unique bucket name by going to `vars.tf` and updating the default value for the `tf-bucket-name` variable.\n\n2. Update to your bucket name in `tfstate.tf` under the `terraform` block at the bottom of the file.\n\n3. Comment out the `terraform` block all the way at the bottom of the `tfstate.tf` file. This is because Terraform expects the S3 bucket to be already created prior to initializing it.\n\n4. Initialize terraform\n\n    ```bash\n    cd terraform/\n    terraform init\n    ```\n\n5. Apply the terraform code\n\n    ```bash\n    terraform apply\n    ```\n\n6. Uncomment the `terraform` block that you commented in step 3.\n\n7. Run apply again to create the S3 bucket to hold the terraform state\n    ```bash\n    terraform apply\n    ```\n\n## Deploying to AWS\n\n1. Go to AWS/ECR\n\n2. Select the `leetbot` repo\n\n3. On the top, click `View push commands` and follow the commands to upload the Leetbot docker image to ECR\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastestmolasses%2Fleetcodediscordbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffastestmolasses%2Fleetcodediscordbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastestmolasses%2Fleetcodediscordbot/lists"}