{"id":16804349,"url":"https://github.com/he0119/nonebot-plugin-user","last_synced_at":"2025-03-17T03:31:16.913Z","repository":{"id":195785462,"uuid":"693666810","full_name":"he0119/nonebot-plugin-user","owner":"he0119","description":"NoneBot 用户插件","archived":false,"fork":false,"pushed_at":"2025-01-06T22:43:05.000Z","size":377,"stargazers_count":12,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T07:51:08.531Z","etag":null,"topics":["nonebot2"],"latest_commit_sha":null,"homepage":"","language":"Python","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/he0119.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2023-09-19T13:27:09.000Z","updated_at":"2025-03-12T20:36:29.000Z","dependencies_parsed_at":"2024-01-03T01:23:46.702Z","dependency_job_id":"4d96ec41-5186-4ee1-94b7-234942ab801c","html_url":"https://github.com/he0119/nonebot-plugin-user","commit_stats":null,"previous_names":["he0119/nonebot-plugin-user"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/he0119%2Fnonebot-plugin-user","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/he0119%2Fnonebot-plugin-user/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/he0119%2Fnonebot-plugin-user/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/he0119%2Fnonebot-plugin-user/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/he0119","download_url":"https://codeload.github.com/he0119/nonebot-plugin-user/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243968878,"owners_count":20376463,"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":["nonebot2"],"created_at":"2024-10-13T09:44:50.554Z","updated_at":"2025-03-17T03:31:16.637Z","avatar_url":"https://github.com/he0119.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- markdownlint-disable MD033 MD036 MD041 --\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://v2.nonebot.dev/\"\u003e\u003cimg src=\"https://v2.nonebot.dev/logo.png\" width=\"200\" height=\"200\" alt=\"nonebot\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n# NoneBot Plugin User\n\n_✨ NoneBot 用户插件 ✨_\n\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://raw.githubusercontent.com/he0119/nonebot-plugin-user/main/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/he0119/nonebot-plugin-user.svg\" alt=\"license\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://pypi.python.org/pypi/nonebot-plugin-user\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/v/nonebot-plugin-user.svg\" alt=\"pypi\"\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/python-3.9+-blue.svg\" alt=\"python\"\u003e\n  \u003ca href=\"https://codecov.io/gh/he0119/nonebot-plugin-user\"\u003e\n    \u003cimg src=\"https://codecov.io/gh/he0119/nonebot-plugin-user/branch/main/graph/badge.svg?token=jd5ufc1alv\" alt=\"codecov\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://jq.qq.com/?_wv=1027\u0026k=7zQUpiGp\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/QQ%E7%BE%A4-730374631-orange?style=flat-square\" alt=\"QQ Chat Group\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## 简介\n\n## 使用方式\n\n加载插件后发送 `/user`、`/inspect` 或 `/bind`。\n\n### 查看用户信息\n\n通过 user 命令可查看用户信息:\n\n```text\n平台名：qq\n平台 ID：10000\n用户名：uy/sun\n创建日期：2023-11-02 04:52:42\n```\n\n### 查看会话信息\n\n通过 inspect 命令可查看当前会话信息:\n\n```text\n平台名：qq\n平台 ID：10000\n自身 ID：20000\n群组 ID：30000\n```\n\n### 绑定用户\n\n通过 bind 命令可将不同用户的数据绑定:\n\n```text\n命令 bind 可用于在多个平台间绑定用户数据。绑定过程中，原始平台的用户数据将完全保留，而目标平台的用户数据将被原始平台的数据所覆盖。\n请确认当前平台是你的目标平台，并在 5 分钟内使用你的账号在原始平台内向机器人发送以下文本：\n/bind nonebot/123456\n绑定完成后，你可以随时使用「bind -r」来解除绑定状态。\n```\n\n## 插件适配\n\n先在插件代码最前面声明依赖\n\n```python\nfrom nonebot import require\nrequire(\"nonebot_plugin_user\")\n```\n\n获取用户信息\n\n```python\nfrom nonebot_plugin_user import User\n\n@matcher.handle()\nasync def _(user: User):\n    await matcher.finish(user.id)\n```\n\n获取用户会话信息\n\n```python\nfrom nonebot_plugin_user import UserSession\n\n@matcher.handle()\nasync def _(session: UserSession):\n    await matcher.finish(session.user_id)\n```\n\n## 配置项\n\n配置方式：直接在 `NoneBot` 全局配置文件中添加以下配置项即可。\n\n### user_token_prefix\n\n- 类型: `str`\n- 默认: `nonebot/`\n- 说明: 生成令牌的前缀\n\n## 计划\n\n- [ ] 支持权限\n\n## 鸣谢\n\n- [Koishi](https://github.com/koishijs/koishi): 本项目直接参考\n- [nonebot-plugin-session](https://github.com/noneplugin/nonebot-plugin-session): 获取用户信息\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhe0119%2Fnonebot-plugin-user","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhe0119%2Fnonebot-plugin-user","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhe0119%2Fnonebot-plugin-user/lists"}