{"id":38563204,"url":"https://github.com/syrinka/nonebot-plugin-report","last_synced_at":"2026-01-18T12:07:56.860Z","repository":{"id":50543296,"uuid":"519384671","full_name":"syrinka/nonebot-plugin-report","owner":"syrinka","description":"使用 webhook 推送消息，实现消息推送自由","archived":false,"fork":false,"pushed_at":"2024-07-03T09:13:39.000Z","size":87,"stargazers_count":22,"open_issues_count":1,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-25T05:24:07.928Z","etag":null,"topics":["nonebot","nonebot-plugin","nonebot2","webhook"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/syrinka.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}},"created_at":"2022-07-30T00:52:49.000Z","updated_at":"2025-09-21T01:30:16.000Z","dependencies_parsed_at":"2023-01-26T14:01:26.921Z","dependency_job_id":null,"html_url":"https://github.com/syrinka/nonebot-plugin-report","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/syrinka/nonebot-plugin-report","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syrinka%2Fnonebot-plugin-report","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syrinka%2Fnonebot-plugin-report/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syrinka%2Fnonebot-plugin-report/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syrinka%2Fnonebot-plugin-report/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syrinka","download_url":"https://codeload.github.com/syrinka/nonebot-plugin-report/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syrinka%2Fnonebot-plugin-report/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28508464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T11:50:55.898Z","status":"ssl_error","status_checked_at":"2026-01-17T11:50:55.569Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["nonebot","nonebot-plugin","nonebot2","webhook"],"created_at":"2026-01-17T07:50:15.790Z","updated_at":"2026-01-18T12:07:56.850Z","avatar_url":"https://github.com/syrinka.png","language":"Python","readme":"\u003cdiv align=\"center\"\u003e\n\n# nonebot-plugin-report\n\n\u003c/div\u003e\n\n## 功能\n\n该插件提供了一个位于 `/report` 的路由，通过此路由可直接向用户推送消息，实现消息推送机器人的功能\n\n## 使用\n\n请求体示例\n```json\n{\n    \"token\": \"your token here\",\n    \"title\": \"report title\",\n    \"content\": \"report content\",\n    \"send_to\": \"send to\"\n}\n```\n\n### 字段\n\nField | Type | Desc\n-- | -- | --\n`token` | `Optional[str]` | 令牌；\u003cbr/\u003e当与设置的 `REPORT_TOKEN` 相同时才会推送消息，否则返回 403\n`title` | `Optional[str]` | 消息标题\n`content` | `str` | 消息内容，*必需字段*\n`send_from` | `Optional[ID]` | 推送消息的机器人 ID；\u003cbr/\u003e若不设置，任意获取一个可用的机器人\n`send_to` | `Optional[ID \\| List[ID]]` | 推送用户 `user_id`；\u003cbr/\u003e若为 `null` 则推送给所有超管；\n`send_to_group` | `Optional[ID \\| List[ID]]` | 推送群组 `group_id`\n\n### 别名\n\n部分字段提供有较短的别名：\n\nField | Alias\n-- | --\n`send_from` | `from`\n`send_to` | `to`\n`send_to_group` | `to_group`\n\n别名的优先度低于原名，当且仅当原名未传入时，才会检查别名\n\n### 配置\n\nField | Type | Desc | Default\n-- | -- | -- | --\n`REPORT_TOKEN` | `Optional[str]` | 令牌，若不设置则不会进行验证，所有人都可以触发 webhook |\n`REPORT_FROM` | `Optional[ID]` | `send_from` 的默认值\n`REPORT_ROUTE` | `str` | 路由，若与其它路由冲突可以更换该值，| `/report`\n`REPORT_TEMPLATE` | `str` | 消息模板，支持 `title` 与 `content` 两个字段，| `{title}\\n{content}`\n\n## 使用例\n\n### python\n\n```bash\nimport requests\ndata = {'token': '...', 'content': '...'}\nrequests.post('http://127.0.0.1:8080/report', json=data)\n```\n\n### curl\n\n```bash\ncurl -L -X POST \\\n     -d '{\"token\": \"...\", \"content\": \"...\"}' \\\n     -H \"Content-Type: application/json\" \\\n     -- http://127.0.0.1:8080/report\n```\n\n### todo\n\n- [x] 支持设置消息模板\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyrinka%2Fnonebot-plugin-report","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyrinka%2Fnonebot-plugin-report","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyrinka%2Fnonebot-plugin-report/lists"}