{"id":26514854,"url":"https://github.com/leafmoes/atri-forward-bot","last_synced_at":"2026-05-16T21:33:01.297Z","repository":{"id":282091767,"uuid":"947441902","full_name":"leafmoes/atri-forward-bot","owner":"leafmoes","description":"A Telegram Forward Bot","archived":false,"fork":false,"pushed_at":"2025-03-12T18:32:18.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T05:31:25.276Z","etag":null,"topics":["bot","forward","telegram"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/leafmoes.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":"2025-03-12T17:35:21.000Z","updated_at":"2025-03-13T02:57:50.000Z","dependencies_parsed_at":"2025-03-12T19:26:09.095Z","dependency_job_id":"b9b68f14-87d2-4def-8a18-e215cc24e1d9","html_url":"https://github.com/leafmoes/atri-forward-bot","commit_stats":null,"previous_names":["leafmoes/atri-forward-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leafmoes/atri-forward-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafmoes%2Fatri-forward-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafmoes%2Fatri-forward-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafmoes%2Fatri-forward-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafmoes%2Fatri-forward-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leafmoes","download_url":"https://codeload.github.com/leafmoes/atri-forward-bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafmoes%2Fatri-forward-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33119411,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T18:38:32.183Z","status":"ssl_error","status_checked_at":"2026-05-16T18:38:29.903Z","response_time":115,"last_error":"SSL_read: 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":["bot","forward","telegram"],"created_at":"2025-03-21T05:29:32.726Z","updated_at":"2026-05-16T21:33:01.291Z","avatar_url":"https://github.com/leafmoes.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1\u003eATRI Forward Bot\u003c/h1\u003e\n\u003cimg src=\"https://lain.bgm.tv/r/400/pic/cover/l/46/f8/297264_Llz6w.jpg\" alt=\"\" height=\"300\"\u003e\n\u003c/div\u003e\n\n因为作者前段时间看了 [亚托莉 -我挚爱的时光-](https://bangumi.tv/subject/297264) ，非常喜欢亚托莉 （アトリ）这个角色，所以机器人使用 ATRI 来命名（之前叫 Baka Forward Bot）\n\n一个高性能的 Telegram Forward Bot，工作在 Telegram SuperGroups Topics。\n\n本项目使用 Deno 作为机器人托管平台，使用附属 KV 作为数据库。\n\n官方免费版使用限制：[1M req/mo, 100 GB/mo, 10ms CPU 时间限制](https://deno.com/deploy/pricing)\n\n免费版预计可支持读取操作45W次，写入操作30w次\n\n对于机器人来说每增加一个与之对话的新陌生人，会产生两次写入\n\n每次机器人收到消息会发生两次读取\n\n综上所述，除非一个月内，你的机器人产生了近15w个陌生用户与你机器人对话，或者收到近20w条消息，此时免费额度会用完。\n\n（wwww，怎么想都不可能用完吧？）\n\n## 命令说明\n\n`/start` : 向用户发送欢迎信息，信息内容可通过环境变量 `START_MESSAGE` 自定义\n\n`/info` : 在话题内直接使用，获取当前话题所对应的用户的信息\n\n`/ban` : 在话题内直接使用，会封禁该话题对应的用户\n\n`/unban` : 在话题内直接使用，会解除封禁该话题对应的用户\n\n`/rmchat` : 在话题内直接使用，删除当前话题\n\n`/about` : 向用户发送关于信息，信息内容可通过环境变量 `ABOUT_MESSAGE` 自定义\n\n`/help` : 向用户发送帮助信息，如果是管理员会展示命令菜单，如果是陌生人会发送欢迎信息。\n\n## 部署教程\n\n你可以 fork 本项目，然后部署到 Deno 云托管平台\n\n### 1. 前置操作\n\n1. 机器人密钥 `BOT_TOKEN`，请前往 [@BotFather](https://t.me/BotFather) 申请。\n2. 管理员ID `ADMIN_ID`，请前往 [@MissRose_bot](https://t.me/MissRose_bot) 发送 `/info` 获取你的 ID 填入\n3. 超级群组ID `SUPERGROUPS_ID`，请前往你要作为接收陌生人消息的群组，然后将群组的ID填入（你可以使用 [@MissRose_bot](https://t.me/MissRose_bot) 发送 `/id` 获取群组ID），最后将群组开启话题模式，以转化为超级群组。\n\n### 2. 部署\n\n1. Fork 本项目到你的Github\n2. 前往 [Deno 新建项目](https://dash.deno.com/new)，如果没有登录请使用 Github 登入 Deno，然后进行操作。\n3. 点击 `Create an empty project` 创建一个空项目，然后点击 `Settings` 设置项目名称以及添加刚才获取的三个环境变量值 `BOT_TOKEN` 、`ADMIN_ID` 、`SUPERGROUPS_ID`\n4. 在 Git Integration 选择你 Fork 的仓库进行连接，`Entrypoint` 设置为 `src/server.ts`，然后点击部署。\n4. 浏览器访问 `https://api.telegram.org/bot\u003cBOT_TOKEN\u003e/setWebhook?url=https://\u003cYOUR_DENO_PROJECT\u003e.deno.dev/\u003cBOT_TOKEN\u003e` 进行 Webhook 注册（注意替换啊，别是笨蛋）。\n5. 把你的机器人拉入到你要作为接收陌生人消息的群组，并给予管理员权限（消息和话题操作的权限都必须留下，否则无法正常工作）\n6. （可选）在绑定的群组里面发送 `/regcmd` 来注册一些命令（`/info`，`/ban`，`/unban`, `/rmchat`）的提示。\n\n## 常见问题\n\n1. 为什么不使用 Cloudflare Workers 平台？\n\n    答：wwww，主要原因是 Workers KV 数据库的读写是最终一致性，非强一致性，可能会在并发的时候导致未知的结果。\n\n2. 为什么不支持 i18n （多语言支持）？\n\n    答：感觉没太大必要？感觉天天水的也是中文社区，也没外国人跟我说话，也不咋和老外交流，如果你需要 i18n，可以尝试提交一些 i18n 翻译，也许会考虑加进去\n\n3. 我该如何为项目做出贡献？\n\n    答：Fork 本项目，然后在自己仓库修改后，提交 Pr 到本仓库","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleafmoes%2Fatri-forward-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleafmoes%2Fatri-forward-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleafmoes%2Fatri-forward-bot/lists"}