{"id":19914170,"url":"https://github.com/alexgurr/botty","last_synced_at":"2025-08-18T23:04:07.041Z","repository":{"id":47303212,"uuid":"317818253","full_name":"alexgurr/botty","owner":"alexgurr","description":"A basic conversational bot using socket.io and nodeJS.","archived":false,"fork":false,"pushed_at":"2023-08-09T08:19:34.000Z","size":139,"stargazers_count":16,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-03T05:31:59.233Z","etag":null,"topics":["bot","conversation","conversational","javascript","node","nodejs","server","socket-io","websocket"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/alexgurr.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":"2020-12-02T09:54:41.000Z","updated_at":"2024-09-23T18:21:23.000Z","dependencies_parsed_at":"2024-11-12T21:37:28.883Z","dependency_job_id":"30caa0f3-c425-483b-aa6b-d2d415470d6c","html_url":"https://github.com/alexgurr/botty","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alexgurr/botty","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexgurr%2Fbotty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexgurr%2Fbotty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexgurr%2Fbotty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexgurr%2Fbotty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexgurr","download_url":"https://codeload.github.com/alexgurr/botty/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexgurr%2Fbotty/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271073387,"owners_count":24694538,"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","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"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":["bot","conversation","conversational","javascript","node","nodejs","server","socket-io","websocket"],"created_at":"2024-11-12T21:35:27.284Z","updated_at":"2025-08-18T23:04:07.018Z","avatar_url":"https://github.com/alexgurr.png","language":"JavaScript","funding_links":["https://www.buymeacoffee.com/alexgurr"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://puu.sh/GTori/c6f7e9cae8.jpg\"\u003e\n  \u003ch1 align=\"center\"\u003e Botty, a basic conversational bot using socket.io and nodeJS.\u003c/h1\u003e\n\u003c/p\u003e\n\n\u0026nbsp;\n\u0026nbsp;\n# Table of Contents 📝\n- [Talking to Botty 💬](#talking-to-botty-)\n- [Configuring Botty 🔧](#configuring-botty-)\n  * [General](#general)\n  * [Interaction](#interaction)\n- [Extending Botty's Responses ✍️](#extending-bottys-responses-%EF%B8%8F)\n- [Running Botty Locally 🚀](#running-botty-locally-)\n- [Botty in the ☁️](#botty-in-the-%EF%B8%8F)\n\n\u0026nbsp;\n# Talking to Botty 💬\n\nBotty is built on top of `socket.io` by default, meaning you should use a client implementation of this to talk to it.\n\nIn JavaScript we can simply do something like:\n\n```javascript\nimport io from 'socket.io-client';\n\nconst socket = io(\n  'https://botty.alexgurr.com',\n  { transports: ['websocket', 'polling', 'flashsocket'] }\n);\n\nsocket.on('bot-message', (message) =\u003e {\n  // do something\n});\n```\n\nBotty is simple and cleanly written. This makes it easy to swap out `socket.io` for a general web socket or `REST` solution for example.\n\n\u0026nbsp;\n# Configuring Botty 🔧\nBotty has an easy-to-change constants file, called `constants.js` in the root of the server. Here's what you can change:\n\n## General\n*General configuration*\n- `PORT`: where the Botty server should listen.\n  \n- `RESPONSES_FILE_PATH`: the file location of the dataset file Botty should source it's responses from. Expects a csv file with keys matching `RESPONSES_INPUT_KEY` and `RESPONSES_OUTPUT_KEY` below.\n\n- `RESPONSES_INPUT_KEY`: the name of the input (matched phrase) column in the csv file above\n\n- `RESPONSES_OUTPUT_KEY`: the name of the output (message) column in the csv file above\n\n- `USER_MESSAGE_EVENT`: the event string Botty listens to for user socket messages.\n\n- `BOT_MESSAGE_EVENT`: the event string Botty will emit for it's reponse messages.\n  \n- `BOT_TYPING_EVENT`: the event string Botty will emit when typing a response. If `MAX_TYPING_S` is falsy, this event will never be emitted.\n\n## Interaction \n*Things to make Botty seem more real*\n\n- `DEFAULT_RESPONSE`: the message Botty replies with if it finds no response matches.\n  \n- `RESPONSE_MATCH_THRESHOLD`: Botty response-matching tolerance. The lower this value, the looser the matches. \n  \n- `MIN_TYPING_S`: the minimum value Botty should 'type' for, in seconds.\n\n- `MAX_TYPING_S`: the maximum value Botty should 'type' for, in seconds. Set this to 0 to skip typing events.\n  \n- `MIN_NATURAL_PAUSE_S`: the minimum pause Botty will take before emitting it's first event, in seconds.\n\n- `MAX_NATURAL_PAUSE_S`: the maximum pause Botty will take before emitting it's first event, in seconds.\n\n\n\u0026nbsp;\n# Extending Botty's Responses ✍️\nBotty has a default dataset file called `response_dataset.csv`. This is easily extendable, or you can provide your own. If you want to bring your own file, simple change the value of the `RESPONSES_FILE_PATH` constant and make sure it's in the correct format (see constants above). \n\n*Feel free to open a pull request to extend the default file.*\n\n\u0026nbsp;\n# Running Botty Locally 🚀\n```javascript\nyarn\n\n# Botty will be available through socket.io on the port defined through the PORT constant\nyarn start\n```\n\n\u0026nbsp;\n# Botty in the ☁️\nBotty is currently hosted and waiting to chat to your app at https://botty.alexgurr.com/. The server isn't free - if you'd like to help out you could \u003ca href=\"https://www.buymeacoffee.com/alexgurr\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/default-orange.png\" alt=\"Buy Me A Coffee\" height=\"30\" width=\"130\"\u003e\u003c/a\u003e\n\nBotty is currently actively used in the [Chatter ReactJS Coding Challenge](https://github.com/alexgurr/react-coding-challenges/tree/master/chatter).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexgurr%2Fbotty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexgurr%2Fbotty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexgurr%2Fbotty/lists"}