{"id":28504851,"url":"https://github.com/jkcoxson/holly","last_synced_at":"2025-07-06T09:31:39.177Z","repository":{"id":223764170,"uuid":"758791600","full_name":"jkcoxson/holly","owner":"jkcoxson","description":"A platform for building Facebook Messenger bots","archived":false,"fork":false,"pushed_at":"2025-06-30T19:43:10.000Z","size":83,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-01T03:54:53.682Z","etag":null,"topics":["api","bot","facebook","messenger","re"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/jkcoxson.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":"2024-02-17T04:58:24.000Z","updated_at":"2025-06-30T19:43:13.000Z","dependencies_parsed_at":"2024-02-22T00:25:46.105Z","dependency_job_id":"bac328bd-2b97-461b-bccc-0de35d8956b9","html_url":"https://github.com/jkcoxson/holly","commit_stats":null,"previous_names":["jkcoxson/holly"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jkcoxson/holly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkcoxson%2Fholly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkcoxson%2Fholly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkcoxson%2Fholly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkcoxson%2Fholly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jkcoxson","download_url":"https://codeload.github.com/jkcoxson/holly/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkcoxson%2Fholly/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263878191,"owners_count":23523919,"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":["api","bot","facebook","messenger","re"],"created_at":"2025-06-08T18:31:06.614Z","updated_at":"2025-07-06T09:31:39.172Z","avatar_url":"https://github.com/jkcoxson.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Holly\nA programmable bot for Messenger, using Selenium\n\n## Setup\n\n0. Install cargo, rust, and geckodriver\n1. Clone the repository\n2. Run `cargo run --release` to create a config file\n3. Edit the config file to your liking\n4. Run `cargo run --release` again to start the bot\n\nThis will only start a bot capable of responding to/sending messages, but will do nothing right now.\n\n## Usage\n\nConnect to the TCP socket defined in the `config.toml`.\nHolly will send messages to all clients in the form of JSON, that looks like this:\n\n```json\n{\n    \"sender\": \"username\",\n    \"content\": \"Ping!\",\n    \"chat_id\": \"1234567890\"\n}\n```\n\nYou can respond with an identical JSON:\n\n```json\n{\n    \"sender\": \"\", // can be left blank, but must be included for parsing\n    \"content\": \"Pong!\",\n    \"chat_id\": \"1234567890\"\n}\n```\n\nHolly also supports commands by TCP for logging and control.\nIn the `sender` field, you can send the following values:\n\n- `\"\u003cscreenshot\u003e\"`: Takes a screenshot and saves it to `log/\u003ctimestamp\u003e.png`\n- `\"\u003chtml\u003e\"`: Dumps the current HTML on the page\n- `\"\u003crestart\u003e\"`: Restarts the bot\n- `\"\u003crefresh\u003e\"`: Refreshes the page\n- `\"\u003cfile\u003e\"`: Sends a file into a chat, with the file path defined by `content`\n\n### Example\n\n```json\n{\n    \"sender\": \"\u003crestart\u003e\",\n    \"content\": \"\", // again, these fields can be blank but must be included\n    \"chat_id\": \"\"\n}\n```\n\n## Library\n\nFor your convenience, there is a simple library that abstracts the\nboilerplate code for writing code for Holly.\nYou can view the library at `holly.py` and place it in your PYTHONPATH.\n\n### Python Example\n\n```python\nimport holly\nimport time\n\ndef main():\n    parser = holly.HollyParser()\n\n    while True:\n        try:\n            client = holly.HollyClient()\n            print('Connected to Holly')\n            while True:\n                raw_msg = client.recv()\n                msg = raw_msg.parse(parser)\n                if msg.match(\"ping\"):\n                    client.send(holly.HollyMessage(\n                      content=\"pong\", chat_id=raw_msg.chat_id, sender=''\n                    ))\n\n        except holly.HollyError as e:\n            print(f\"Error: {e}\")\n\n        print('Disconnected from Holly socket')\n        time.sleep(30)\n\nif __name__ == \"__main__\":\n    main()\n```\n\n## Examples\n\nYou can find more examples in the `children` folder, which are all written using the library.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkcoxson%2Fholly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjkcoxson%2Fholly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkcoxson%2Fholly/lists"}