{"id":15804775,"url":"https://github.com/cnishina/chatbot-with-yuka","last_synced_at":"2025-03-31T22:02:09.592Z","repository":{"id":61126035,"uuid":"548541708","full_name":"cnishina/chatbot-with-yuka","owner":"cnishina","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-21T00:09:53.000Z","size":32,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-06T02:01:57.960Z","etag":null,"topics":["bot","chatbot","hacktoberfest","twitch"],"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/cnishina.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}},"created_at":"2022-10-09T19:31:06.000Z","updated_at":"2022-11-27T22:36:25.000Z","dependencies_parsed_at":"2023-01-22T06:45:29.236Z","dependency_job_id":null,"html_url":"https://github.com/cnishina/chatbot-with-yuka","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/cnishina%2Fchatbot-with-yuka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnishina%2Fchatbot-with-yuka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnishina%2Fchatbot-with-yuka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnishina%2Fchatbot-with-yuka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cnishina","download_url":"https://codeload.github.com/cnishina/chatbot-with-yuka/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246547387,"owners_count":20794970,"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","chatbot","hacktoberfest","twitch"],"created_at":"2024-10-05T02:01:43.358Z","updated_at":"2025-03-31T22:02:09.560Z","avatar_url":"https://github.com/cnishina.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Focus chatbot\n\nThis chatbot listens to the focus command and writes it to a `focus.csv` file.\nIf the file does not exist, it will be created. Rotates the `focus.csv` file on\nmonth or year not matching up. The rotation uses UTC timestamps.\n\n\u003e Example:\n\u003e \n\u003e chat sends:\n\u003e\n\u003e ```\n\u003e !focus Creating a chatbot for yuka.\n\u003e ```\n\u003e \n\u003e The `focus.csv` file should contain:\n\u003e \n\u003e ```\n\u003e bedtimebear_808,2022-10-09T20:58:57.965000,Creating a chatbot for yuka.\n\u003e ```\n\n# Getting started\n\nCreate a new twitch account that you'll use as the chat bot. Maybe something\ncalled \"yuka_bot\" or \"bot_with_yuka\"? Next you will navigate to\nhttps://dev.twitch.tv/console create an application.\n\nNext navigate to the following URL (replacing the `\u003cyour client id\u003e` with\nthe client id from the application).\n\n```\nhttps://id.twitch.tv/oauth2/authorize?response_type=token\u0026client_id=\u003cyour client id\u003e\u0026redirect_uri=http://localhost:3000\u0026scope=chat%3Aread+chat%3Aedit\n```\n\nThis will redirect to a URL that looks something like this:\n\n```\nhttp://localhost:3000/#access_token=\u003caccess_token\u003e\u0026scope=chat%3Aread+chat%3Aedit\u0026token_type=bearer\n```\n\nCreate a .env file at the root of this project and copy the `\u003caccess_token\u003e`\nfrom the URL string. In addition, add in the `\u003cchannel\u003e` where the bot should\nsend messages. Also, we should include the client id. The client id is used\nto make a GET request to the Twitch API to check if you are live. This should\nlook as follows:\n\n```\nACCESS_TOKEN=\u003caccess_token\u003e\nCHANNEL=\u003cchannel\u003e\nCLIENT_ID=\u003cclient_id\u003e\n```\n\n## Running chatbot with poetry\n\n```\npoetry install\npoetry shell\npython3 main.py\n```\n\n## Running chatbot with a virutal env:\n\n```\npython3 -m venv .\nsource bin/activate\npip install -r requirements.txt\npython3 main.py\n```\n\n## Running unit tests\n\n```\npython3 -m unittest focus_test.py\n```\n\n## Updating the requirements.txt from Poetry\n\n```\npoetry export -f requirements.txt --output requirements.txt\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnishina%2Fchatbot-with-yuka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcnishina%2Fchatbot-with-yuka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnishina%2Fchatbot-with-yuka/lists"}