{"id":25984925,"url":"https://github.com/sebastyijan-fi/hapsu","last_synced_at":"2026-06-18T23:31:07.450Z","repository":{"id":163038935,"uuid":"638481852","full_name":"sebastyijan-fi/hapsu","owner":"sebastyijan-fi","description":"Openai API chatbot for Discord with short persistent memory.","archived":false,"fork":false,"pushed_at":"2023-05-19T09:15:23.000Z","size":23473,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"github","last_synced_at":"2025-08-17T22:26:31.234Z","etag":null,"topics":["chatbot","discord-bot","openai-api","python"],"latest_commit_sha":null,"homepage":"","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/sebastyijan-fi.png","metadata":{"files":{"readme":"README.md","changelog":"change_keys.sh","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":"2023-05-09T13:05:02.000Z","updated_at":"2023-05-19T08:35:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"f301e2b3-d16d-4de2-880d-225c247370bb","html_url":"https://github.com/sebastyijan-fi/hapsu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sebastyijan-fi/hapsu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastyijan-fi%2Fhapsu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastyijan-fi%2Fhapsu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastyijan-fi%2Fhapsu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastyijan-fi%2Fhapsu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sebastyijan-fi","download_url":"https://codeload.github.com/sebastyijan-fi/hapsu/tar.gz/refs/heads/github","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastyijan-fi%2Fhapsu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34511617,"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-18T02:00:06.871Z","response_time":128,"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":["chatbot","discord-bot","openai-api","python"],"created_at":"2025-03-05T11:52:27.274Z","updated_at":"2026-06-18T23:31:07.418Z","avatar_url":"https://github.com/sebastyijan-fi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hapsu Discord Bot\n\nHapsu is a Discord bot that uses OpenAI's Language Model (3.5) to assist you in a variety of tasks. Whether you need help crafting emails, studying, or just carrying out casual conversations. \n\nIt has a persistent memory window of the last three messages, saved to a JSON file, which allows it to maintain a light weight context in ongoing conversations.\n\nIts setup process is straightforward, follow the [wiki](https://github.com/sebastyijan-fi/hapsu/wiki).\n\n## Why Use Hapsu?\n\n- **Versatility**: It's an AI-powered assistant that can help you write emails, study for exams, answer your queries, and much more.\n  \n- **Persistence**: Hapsu remembers the last three messages in the conversation. This is a light weight way to maintain the context.\n  \n- **Ease of Use**: You don't need advanced technical skills to set it up and use it, just follow the [wiki](https://github.com/sebastyijan-fi/hapsu/wiki)..\n\n## Usage Guide\n\nWith Hapsu, each Discord channel can have its own unique personality and rules. The ask, role, and rule commands are customizable for every channel.\n\nHere are the commands you can use:\n\n- `.ask`: Use this command to ask Hapsu a question. Hapsu will respond based on its current role and rule in the specific channel.\n- `.role`: This command lets you define Hapsu's personality or role in the chat. For example, `.role Pretend you are a Pirate` would instruct Hapsu to behave as a Pirate.\n- `.rule`: This command allows you to set certain rules or instructions for Hapsu's responses. For example, `.rule Answer in 60 words max` would instruct Hapsu to answer with maximum of 60 words. Note that this command is part of the user message, but not part of the conversation history.\n- `.helper`: Use this command to display a list of available commands in Discord.\n\nEach channel has its own settings for `role` and `rule`, and maintains its own message history, Experiment with these commands to see what works best for you!\n\n## Quick Setup recap\n\nSetting up Hapsu is easy and straightforward with detailed image guide in this [wiki](https://github.com/sebastyijan-fi/hapsu/wiki). \n\n1. **Create Necessary Accounts**: Follow the image instructions.\n\n2. **Set Up a Server**: Follow the image instructions.\n\n3. **Run the Script in terminal**:\n\n```bash\nsudo curl -H 'Cache-Control: no-cache' -O https://raw.githubusercontent.com/sebastyijan-fi/hapsu/github/run_bot.sh \u0026\u0026 chmod +x run_bot.sh \u0026\u0026 ./run_bot.sh\n```\n\nThis command will download the `run_bot.sh` script from the repository, make it executable, and run it. The script will:\n\n- Install necessary dependencies.\n- Prompt you to enter your OpenAI API keys and Discord Bot token with nano editor.\n- Save these keys to a `.env` file.\n- Keep everything updated with a cronjob.\n- Start the bot and keep it running.\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebastyijan-fi%2Fhapsu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsebastyijan-fi%2Fhapsu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebastyijan-fi%2Fhapsu/lists"}