{"id":20978100,"url":"https://github.com/iitii/nexusphpstaffbot","last_synced_at":"2025-04-12T02:26:12.996Z","repository":{"id":208187739,"uuid":"721003233","full_name":"IITII/NexusphpStaffBot","owner":"IITII","description":"nexusphp 通用 TG 站务机器人","archived":false,"fork":false,"pushed_at":"2024-01-22T02:35:50.000Z","size":72,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T02:26:07.343Z","etag":null,"topics":["administration","nexusphp","tgbot"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/sikii/nexusphp_staff_bot","language":"JavaScript","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/IITII.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}},"created_at":"2023-11-20T06:44:28.000Z","updated_at":"2025-03-14T14:57:22.000Z","dependencies_parsed_at":"2024-01-05T04:27:01.043Z","dependency_job_id":"7a1d1c20-1479-44ed-846b-37fae1733922","html_url":"https://github.com/IITII/NexusphpStaffBot","commit_stats":null,"previous_names":["iitii/nexusphpstaffbot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IITII%2FNexusphpStaffBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IITII%2FNexusphpStaffBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IITII%2FNexusphpStaffBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IITII%2FNexusphpStaffBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IITII","download_url":"https://codeload.github.com/IITII/NexusphpStaffBot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248506503,"owners_count":21115441,"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":["administration","nexusphp","tgbot"],"created_at":"2024-11-19T05:04:21.246Z","updated_at":"2025-04-12T02:26:12.973Z","avatar_url":"https://github.com/IITII.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NexusphpStaffBot\n\nnexusphp 通用 TG 站务机器人\n\n## 设计目标\n* 便捷处理站务, 避免用户等待太久, 也减轻了管理组的负担\n* 定时通知, 比如候选有的时候就会忘掉\n* 使用皮套统一回复\n## 用途\n\u003e 也可以简单作为私信的 TG 机器人使用, 其他功能没权限没数据会跳过\n\n* mod+ 单独拉个群, 群里面用机器人统一处理站务. 机器人的用户信息群内共享. 消息处理完之后在消息上面使用表情进行回复, 用于区分和标记状态.\n* 简单的`管理组私信`和`私信`可以直接在 TG 里面回复对应消息, 机器人会自动转发到站内.\n* ~~有时站点确实不如 TG 看的多~~\n## 支持的功能\n* 管理组私信, 翻页\n* 举报处理\n* 私信, 翻页\n* 候选\n* 设置为已处理: 管理组私信, 举报\n* 已处理信息自动删除\n* TG 回复: 管理组私信, 举报, 私信\n\n## 支持的站点\n\u003e 基于原版 nexusphp 开发, 有些站点可能需要适配才能使用\n\n* [x] PterClub\n* [x] 2xfree\n* [ ] Audiences\n* [ ] OurBits\n\n## 运行\n\u003e 部署多个的时候务必修改目录, 保证一个目录对应一个容器  \n\u003e\n\n1. 修改 compose 文件里面以下内容\n2. `docker-compose up -d` 即可\n\n```\n    environment:\n      - TZ=Asia/Shanghai\n      # tg 机器人 token\n      - BOT_TOKEN=xxxxxxxx\n      # tg 群组 id\n      - GROUP_ID=\n      # 通用话题 id\n      - GENERAL_THREAD_ID=\n      # 管理组消息 话题 id\n      - GENERAL_MSG_THREAD_ID=\n      # 服务\n      # 开启定时任务, 默认 15 分钟一次\n      - STAFF_MSG_ENABLE=true\n      # - STAFF_MSG_ENABLE=false\n      # 服务配置\n      # mod+ 用户的 cookie, 要不然看不消息...\n      - STAFF_MSG_COOKIE=xxxxxxxx\n      ## 单独控制可选功能, 比如候选单独给种审拉个群\n      # GROUP_ID 和 THREAD_ID 相关配置支持向上 fallback\n      # XXXX_MSG_THREAD_ID=false 时, 支持发送消息到非话题群组, 除了 GENERAL_MSG_THREAD_ID\n      # 管理组私信\n      - STAFF_MSG_GROUP_ID=\n      - STAFF_MSG_THREAD_ID=\n      - STAFF_MSG_DISABLE_STAFF=false\n      # 举报\n      - REPORT_MSG_GROUP_ID=\n      - REPORT_MSG_THREAD_ID=\n      - STAFF_MSG_DISABLE_REPORT=false\n      # 私信\n      - MSG_MSG_GROUP_ID=\n      - MSG_MSG_THREAD_ID=\n      - STAFF_MSG_DISABLE_MESSAGE=false\n      # 候选\n      - OFFER_MSG_GROUP_ID=\n      - OFFER_MSG_THREAD_ID=\n      - STAFF_MSG_DISABLE_OFFER=false\n      # 站点schema\n      - STAFF_MSG_SITE=PterClub\n      # - STAFF_MSG_SITE=Xfree\n      # - STAFF_MSG_SITE=Audiences\n      # - STAFF_MSG_SITE=Ourbits\n```\n\n## 可用机器人命令列表\n\u003e 编辑机器人命令时可以直接用这个发给 `@BotFather`  \n\n```\nid - 获取 ChatId 等\nstaff - 获取管理组消息\njson - 以 json 格式获取消息内容-调试用\n```\n\n## ID 信息怎么获取?\n\n1. 使用 id 命令\n2. 使用其他 bot 获取\n3. 将机器人添加到群组后, 设置为管理员, 从日志里面能看出来\n4. https://iitii.github.io/2022/09/28/1/\n\n## 适配新站点\n* 站点信息位于: `libs/staff/sites/index.js`, 基于 `libs/staff/sites/NexusphpSchema.js` 模板进行开发, 所有方法均已抽象, 按需实现即可.\n* 管理站内信私信我\n----\n* 并不是所有站点都需要这个功能, 或许也有一些站点已经自己实现了部分功能, 但是没有开源出来\n* 开源的目的是为了减少重复劳动, 也是为了方便站点管理组, 方便用户.\n* 如果你需要这个功能, 请提 issue, 或者自己实现, 希望可以提 PR\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiitii%2Fnexusphpstaffbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiitii%2Fnexusphpstaffbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiitii%2Fnexusphpstaffbot/lists"}