{"id":28274393,"url":"https://github.com/iranian-github/here-to-help-tg-bot","last_synced_at":"2025-06-16T05:31:24.506Z","repository":{"id":281827994,"uuid":"939009030","full_name":"iranian-github/here-to-help-tg-bot","owner":"iranian-github","description":"Telegram Bot for the \"Here to Help\" project","archived":false,"fork":false,"pushed_at":"2025-03-11T10:21:28.000Z","size":98,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-21T01:17:06.039Z","etag":null,"topics":["community-driven","free-resources","healthcare","humanitarian","information-directory","public-service","social-impact","social-services","telegram","telegram-bot"],"latest_commit_sha":null,"homepage":"https://t.me/iran_here_to_help_bot","language":"TypeScript","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/iranian-github.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":"2025-02-25T21:03:47.000Z","updated_at":"2025-03-11T10:21:31.000Z","dependencies_parsed_at":"2025-03-11T11:29:33.925Z","dependency_job_id":"c39366db-bcd7-4ada-a510-f18808345636","html_url":"https://github.com/iranian-github/here-to-help-tg-bot","commit_stats":null,"previous_names":["iranian-github/here-to-help-tg-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iranian-github/here-to-help-tg-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iranian-github%2Fhere-to-help-tg-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iranian-github%2Fhere-to-help-tg-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iranian-github%2Fhere-to-help-tg-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iranian-github%2Fhere-to-help-tg-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iranian-github","download_url":"https://codeload.github.com/iranian-github/here-to-help-tg-bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iranian-github%2Fhere-to-help-tg-bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260105979,"owners_count":22959575,"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":["community-driven","free-resources","healthcare","humanitarian","information-directory","public-service","social-impact","social-services","telegram","telegram-bot"],"created_at":"2025-05-21T01:17:02.345Z","updated_at":"2025-06-16T05:31:24.497Z","avatar_url":"https://github.com/iranian-github.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Here To Help Telegram Bot Worker\n\n![HereToHelpTelegramBot](https://raw.githubusercontent.com/iranian-github/here-to-help-tg-bot/master/images/heretohelp_bot.png)\n\nA Cloudflare Worker-based Telegram bot that provides information about free support services and resources for people in need. A subproject of the [Here to Help](https://github.com/iranian-github/here-to-help).\n\n## Features\n\n- `/start` - Welcome message and list of available commands\n- `/help` - Usage instructions\n- `/suicide` - Information about suicide prevention and self-harm\n- `/violence` - Information about domestic violence and physical abuse\n- `/illness` - Information about chronic illnesses\n- `/addiction` - Information about addiction and substance abuse\n- `/general` - General support resources\n- `/website` - Get the website URL\n\n## Development Setup\n\n1. Clone the repository\n\n```bash\ngit clone https://github.com/iranian-github/here-to-help-tg-bot\ncd here-to-help-tg-bot-worker\n```\n\n2. Install dependencies\n\n```bash\nnpm install\n```\n\n3. Copy the sample environment variables file and fill in your values\n\n```bash\ncp .dev.vars.sample .dev.vars\n```\n\n4. Delete the webhook (if set) to test locally\n\n```bash\ncurl -X POST https://api.telegram.org/bot\u003cYOUR_BOT_TOKEN\u003e/deleteWebhook\n```\n\n5. Start the development server\n\n```bash\nnpm run dev\n```\n\n## Local Testing with cURL\n\nOnce your development server is running, you can test the bot using cURL commands. Here are some examples:\n\n### Test Regular Messages\n\n```bash\ncurl -X POST http://localhost:8787 \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"message\": {\n      \"text\": \"Hello\",\n      \"chat\": {\"id\": YOUR_CHAT_ID},\n      \"from\": {\"id\": YOUR_CHAT_ID}\n    }\n  }'\n```\n\n### Test Commands\n\n```bash\n# Test /start command\ncurl -X POST http://localhost:8787 \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"message\": {\n      \"text\": \"/start\",\n      \"chat\": {\"id\": YOUR_CHAT_ID},\n      \"from\": {\"id\": YOUR_CHAT_ID},\n      \"entities\": [{\"type\": \"bot_command\", \"offset\": 0, \"length\": 6}]\n    }\n  }'\n\n# Test /help command\ncurl -X POST http://localhost:8787 \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"message\": {\n      \"text\": \"/help\",\n      \"chat\": {\"id\": YOUR_CHAT_ID},\n      \"from\": {\"id\": YOUR_CHAT_ID},\n      \"entities\": [{\"type\": \"bot_command\", \"offset\": 0, \"length\": 5}]\n    }\n  }'\n```\n\nNote: Replace `YOUR_CHAT_ID` with your actual Telegram chat ID.\n\n## Deployment\n\nTo deploy to Cloudflare Workers:\n\n```bash\nnpm run deploy\n```\n\nAfter deployment, set up your webhook URL:\n\n```bash\ncurl -X POST https://api.telegram.org/bot\u003cYOUR_BOT_TOKEN\u003e/setWebhook \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"url\": \"https://your-worker-url.workers.dev\"}'\n```\n\n## License\n\nThis software is licensed under the MIT License. for more information, please see the [LICENSE](LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firanian-github%2Fhere-to-help-tg-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firanian-github%2Fhere-to-help-tg-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firanian-github%2Fhere-to-help-tg-bot/lists"}