{"id":22347489,"url":"https://github.com/chand1012/hooky","last_synced_at":"2026-05-02T15:31:43.207Z","repository":{"id":258602830,"uuid":"803376517","full_name":"chand1012/hooky","owner":"chand1012","description":"Webhook and REST to reuseable Discord commands","archived":false,"fork":false,"pushed_at":"2024-10-17T13:55:42.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-26T21:44:43.924Z","etag":null,"topics":["bot","discord","discord-bot","discordgo","rest","webhook"],"latest_commit_sha":null,"homepage":"","language":"Go","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/chand1012.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-20T15:50:47.000Z","updated_at":"2024-10-17T13:55:45.000Z","dependencies_parsed_at":"2024-10-20T15:41:34.890Z","dependency_job_id":null,"html_url":"https://github.com/chand1012/hooky","commit_stats":null,"previous_names":["chand1012/hooky"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chand1012/hooky","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chand1012%2Fhooky","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chand1012%2Fhooky/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chand1012%2Fhooky/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chand1012%2Fhooky/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chand1012","download_url":"https://codeload.github.com/chand1012/hooky/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chand1012%2Fhooky/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32539571,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T12:25:33.646Z","status":"ssl_error","status_checked_at":"2026-05-02T12:24:51.733Z","response_time":132,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","discord","discord-bot","discordgo","rest","webhook"],"created_at":"2024-12-04T10:09:31.721Z","updated_at":"2026-05-02T15:31:43.189Z","avatar_url":"https://github.com/chand1012.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hooky - configurable REST Discord bot\n\nHooky is a bot that allows you to configure any webhook or REST request into a Discord command that can be triggered by users. It is designed to be easy to use and flexible, allowing you to configure any webhook or REST request you want.\n\n## Why'd you make this?\n\nI make a lot of projects. There's usually one thing those projects all have in common - a REST API. I wanted a way to quickly use my REST APIs from some sort of interface without having to write either a new Discord bot or a new web interface for each project. I also wanted to be able to configure these commands without having to write any code (JSON isn't code, right?).\n\nThis means that in theory, if you just write a REST API, you can use Hooky to interact with it or even turn it into its own standalone Discord bot.\n\nFor example, something I use a lot of self-hosted no-code tools like [n8n](https://n8n.io) and [Dify](https://github.com/langgenius/dify). Both offer no-code options to interact with, however I wanted a single interface to interact with them, as well as any other REST interface. Hooky allows me to do that.\n\n## Features\n\nChecked means it's implemented, unchecked means it's planned.\n\n- [x] Configurable commands\n- [x] JSON parsing and requests\n- [ ] JSON list parsing\n- [x] Request templates\n- [x] Response templates\n- [x] Query params\n- [ ] Form data\n- [ ] File uploads\n- [ ] Rate limiting\n- [ ] URL parameters\n\n## Setup\n\n### Prerequisites\n- Go 1.22 or later or Docker\n- A Discord bot token\n- A Discord app ID\n- (Optional) A Discord guild ID\n- (Optional) Just\n\n```bash\ngit clone https://github.com/chand1012/hooky.git\ncd hooky\n```\n\n### Building\n```bash\njust build\n## or if you don't have Just\ngo build -o hooky main.go\n## or if you want to use Docker\ndocker build -t hooky .\n```\n\n### Running with Go\n```bash\n# guild and config-dir are optional. Token, App, and Guild can be specified via flags or environment variables.\n./hooky -token \u003cbot-token\u003e -app \u003capp-id\u003e -config-dir \u003cconfig-dir\u003e -guild \u003cguild-id\u003e\n```\n\nIf you have Just installed, you can also run `just start` to start the bot. This will also allow you to load a `.env` file with the following variables:\n```\nBOT_TOKEN=\u003cbot-token\u003e\nAPP_ID=\u003capp-id\u003e\nGUILD_ID=\u003cguild-id\u003e\n```\n\n```bash\n# load .env, build, and run\njust start\n```\n\n### Running with Docker\n```bash\ndocker run -e BOT_TOKEN=\u003cbot-token\u003e -e APP_ID=\u003capp-id\u003e -e GUILD_ID=\u003cguild-id\u003e -v /path/to/config:/app/config hooky\n```\n\n## Configuration\n\nFor the Guild ID, bot token, and app ID, \n\nHooky uses a configuration file in JSON format to define commands and their corresponding REST requests. The configuration file is loaded from the directory specified by the `--config-dir` flag. All files in the directory are loaded and parsed as command configurations, name doesn't matter. One file is a single command configuration.\n\n### Command Configuration\n\nA command configuration defines a single command that can be triggered by a user. A command configuration is a JSON object with the following properties:\n\n* `name`: A string that specifies the name of the command. This is the command that users will trigger to execute the corresponding REST request.\n* `description`: A string that provides a brief description of the command.\n* `method`: A string that specifies the HTTP method to use for the REST request (e.g. `GET`, `POST`, `PUT`, `DELETE`, etc.).\n* `url`: A string that specifies the URL of the REST request.\n* `body`: An array of `Param` objects that specify the parameters to include in the request body.\n* `body_template`: A string that specifies a template to use for generating the request body. The template can use variables from the `body` array. Should be in the form of your request body, with variables in the form of `{{.variable_name}}`.\n* `query`: An array of `Param` objects that specify the query parameters to include in the request.\n* `form`: An array of `Param` objects that specify the form data to include in the request.\n* `headers`: An object that specifies the headers to include in the request.\n* `parse_json`: An object that specifies how to parse the response JSON.\n* `response_template`: A string that specifies a template to use for generating the response. The template can use variables from the parsed JSON response. Should be in the form of your response, with variables in the form of `{{.variable_name}}`.\n\n### Param Configuration\n\nA `Param` object specifies a single parameter for a command. A `Param` object has the following properties:\n\n* `name`: A string that specifies the name of the parameter.\n* `description`: A string that provides a brief description of the parameter.\n* `type`: A string that specifies the type of the parameter (e.g. `string`, `integer`, `boolean`, etc.).\n* `required`: A boolean that specifies whether the parameter is required.\n* `default`: A value that specifies the default value of the parameter.\n* `options`: An array of values that specifies the valid options for the parameter.\n\n### Example Configuration\n\nHere is an example configuration file that defines a single command:\n```json\n{\n  \"name\": \"example\",\n  \"description\": \"This is a test command\",\n  \"method\": \"POST\",\n  \"url\": \"https://httpbin.org/anything\",\n  \"body\": [\n    {\n      \"name\": \"content\",\n      \"description\": \"This is a test command\",\n      \"type\": \"string\",\n      \"required\": true\n    },\n    {\n      \"name\": \"bees\",\n      \"description\": \"save the bees\",\n      \"required\": false,\n      \"type\": \"boolean\",\n      \"default\": false\n    },\n    {\n      \"name\": \"select\",\n      \"description\": \"This is a selection\",\n      \"required\": false,\n      \"type\": \"string\",\n      \"options\": [\"thing 1\", \"thing 2\"],\n      \"default\": \"thing 2\"\n    }\n  ],\n  \"body_template\": \"{ \\\"content\\\": \\\"{{ .content }}\\\", \\\"dummy\\\": \\\"am dummy\\\", \\\"bees\\\": \\\"{{ .bees }}\\\", \\\"select\\\": \\\"{{.select}}\\\" }\",\n  \"parse_json\": {\n    \"response_content\": \".json.content\",\n    \"bees\": \".json.bees\",\n    \"select\": \".json.select\"\n  },\n  \"response_template\": \"{{.response_content}}\\n\\nBees? {{.bees}}\\n\\nSelection: {{.select}}\"\n}\n\n```\nThis configuration defines a command called `example` that makes a `POST` request to `https://httpbin.org/anything`. The request body includes two parameters: `content` and `bees`. The `content` parameter is required and has a type of `string`, while the `bees` parameter is optional and has a type of `boolean`. The request also includes a query parameter `api_key` that is required. The response is parsed as JSON and the `response_template` is used to generate the final response.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchand1012%2Fhooky","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchand1012%2Fhooky","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchand1012%2Fhooky/lists"}