{"id":19335485,"url":"https://github.com/patatobit/twitchbot","last_synced_at":"2026-06-20T07:31:19.322Z","repository":{"id":144728734,"uuid":"481631438","full_name":"PatatoBit/twitchbot","owner":"PatatoBit","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-18T04:54:40.000Z","size":72,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-18T07:04:01.726Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/PatatoBit.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}},"created_at":"2022-04-14T14:16:15.000Z","updated_at":"2022-04-14T14:17:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"a496e3cf-dd2c-41e7-bc90-86f0cc46a666","html_url":"https://github.com/PatatoBit/twitchbot","commit_stats":null,"previous_names":["patatobit/twitchbot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PatatoBit/twitchbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatatoBit%2Ftwitchbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatatoBit%2Ftwitchbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatatoBit%2Ftwitchbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatatoBit%2Ftwitchbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PatatoBit","download_url":"https://codeload.github.com/PatatoBit/twitchbot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatatoBit%2Ftwitchbot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34561766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-10T03:07:40.798Z","updated_at":"2026-06-20T07:31:19.305Z","avatar_url":"https://github.com/PatatoBit.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Autogacha\n\nPeriodically play `!gacha` on 9arm channel\n\n## Setup\n\n1. Create Twitch developer OAuth application : https://dev.twitch.tv/console/apps\n\n   - Name : Use any name\n   - OAuth Redirect URLS : Use any valid URL eg. `http://localhost/oauth`\n   - Category : Chat Bot\n   - Note `Client ID` \u0026 `Client Secret`\n\n1. Set `Client ID` \u0026 `Client Secret` in `.env`, save as `.env.local` to prevent commiting to Git.\n1. Get OAuth Authorization Code\n\n   - Replace `Client ID` \u0026 `OAuth Redirect URL` in this url, then access through browser.\n\n     ```plaintext\n     https://id.twitch.tv/oauth2/authorize?client_id=YOUR_CLIENT_ID\u0026redirect_uri=YOUR_REDIRECT_URL\u0026response_type=code\u0026scope=chat:read+chat:edit\n     ```\n\n   - Authenticate then get Authorization Code via `code` query string after redirect\n\n     ```plaintext\n     http://localhost/oauth?code=YOUR_AUTH_CODE\u0026scope=chat%3Aread+chat%3Aedit\n     ```\n\n1. Get OAuth Access Token \u0026 Refresh Token\n\n   - Replace `Client ID`, `Client Secret`, `Redirect URL`, and `Authorization Code` in this url:\n\n     ```plaintext\n     https://id.twitch.tv/oauth2/token?client_id=YOUR_CLIENT_ID\u0026client_secret=YOUR_CLIENT_SECRET\u0026code=YOUR_AUTH_CODE\u0026grant_type=authorization_code\u0026redirect_uri=YOUR_REDIRECT_URL\n     ```\n\n   - Request tokens from URL above via `POST` request (Use `Postman`, `Insomnia`, `cURL`, `wget`, etc.)\n     ```zsh\n     curl -X POST 'https://id.twitch.tv/oauth2/token?client_id=YOUR_CLIENT_ID\u0026client_secret=YOUR_CLIENT_SECRET\u0026code=YOUR_AUTH_CODE\u0026grant_type=authorization_code\u0026redirect_uri=YOUR_REDIRECT_URL'\n     ```\n   - You'll get `access_token` \u0026 `refresh_token` via JSON\n\n     ```json\n     {\n       \"access_token\": \"abcdha31dpldqi4m8ucf2cfqhh72t9\",\n       \"expires_in\": 12345,\n       \"refresh_token\": \"wxyz4h7t3v4t0ngdl3ri6se4b6qvava4xc931rxro2leh6at9h\",\n       \"scope\": [\"chat:edit\", \"chat:read\"],\n       \"token_type\": \"bearer\"\n     }\n     ```\n\n1. Save this file as `tokens.json`\n\n1. `yarn install` or `npm install`\n\n1. `yarn dev` or `npm run dev`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatatobit%2Ftwitchbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatatobit%2Ftwitchbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatatobit%2Ftwitchbot/lists"}