{"id":27770669,"url":"https://github.com/hanshino/redive_linebot","last_synced_at":"2025-04-29T21:13:22.398Z","repository":{"id":37002937,"uuid":"277488931","full_name":"hanshino/redive_linebot","owner":"hanshino","description":"基於 Bottender 框架實作出的，公主連結聊天機器人，附加其他實用管理功能。","archived":false,"fork":false,"pushed_at":"2025-04-29T02:12:53.000Z","size":28917,"stargazers_count":23,"open_issues_count":2,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-29T21:13:16.935Z","etag":null,"topics":["bottender","chatbot","docker-compose","linebot","node-js","princess-connect-redive"],"latest_commit_sha":null,"homepage":"https://liff.line.me/1654464491-YNenGe96","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/hanshino.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,"zenodo":null}},"created_at":"2020-07-06T08:43:37.000Z","updated_at":"2025-04-02T07:12:55.000Z","dependencies_parsed_at":"2023-09-25T11:39:11.367Z","dependency_job_id":"6207e951-2ebd-43fd-a456-2fab02b4f403","html_url":"https://github.com/hanshino/redive_linebot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanshino%2Fredive_linebot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanshino%2Fredive_linebot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanshino%2Fredive_linebot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanshino%2Fredive_linebot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hanshino","download_url":"https://codeload.github.com/hanshino/redive_linebot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251582943,"owners_count":21612747,"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":["bottender","chatbot","docker-compose","linebot","node-js","princess-connect-redive"],"created_at":"2025-04-29T21:13:21.864Z","updated_at":"2025-04-29T21:13:22.385Z","avatar_url":"https://github.com/hanshino.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 公主連結聊天機器人\n\n本專案是基於框架[bottender](https://bottender.js.org/)進行實作，此框架特色\n\n- 適用於多種臺灣常用聊天 app ~~雖然我都沒有好友，只好寫機器人陪我聊天~~\n- 框架已處理好不同平台的規則，無須因應各平台進行適應\n- 開發過程協助分析每一動作的耗時，進行效能優化\n- 因為他真的超好用 der\n\n## 目錄\n\n- [公主連結聊天機器人](#公主連結聊天機器人)\n  - [目錄](#目錄)\n  - [使用須知](#使用須知)\n  - [機器配置](#機器配置)\n    - [Production](#production)\n    - [Developement](#developement)\n  - [目前適用聊天軟體](#目前適用聊天軟體)\n  - [此專案特色](#此專案特色)\n    - [各大遊戲性功能 - 管理員用](#各大遊戲性功能---管理員用)\n    - [群組功能性 - 使用者用](#群組功能性---使用者用)\n    - [公主連結資訊查詢 - 使用者](#公主連結資訊查詢---使用者)\n  - [部分截圖](#部分截圖)\n  - [事前準備](#事前準備)\n  - [安裝方式](#安裝方式)\n    - [前置作業](#前置作業)\n    - [正式用](#正式用)\n    - [開發用](#開發用)\n    - [額外教學 (ngrok)](#額外教學-ngrok)\n    - [Line 後臺設定](#line後臺設定)\n  - [注意事項](#注意事項)\n\n## 使用須知\n\n本專案已配置好所有程式所需之環境，只需跟著[安裝方式](#安裝方式)，進行操作即可。\n\n## 機器配置\n\n此專案結合了 `docker-compose` 一鍵佈署的特性，以下為使用到的服務\n\n### Production\n\n| container  | image                                                                                  | expose | 說明                                  |\n| ---------- | -------------------------------------------------------------------------------------- | ------ | ------------------------------------- |\n| nginx      | [nginx](https://hub.docker.com/_/nginx)                                                | 80     | `webserver`                           |\n| frontend   | [frontend](https://github.com/hanshino/redive_linebot/blob/master/frontend/Dockerfile) | 80     | `react-frontend`                      |\n| bot        | [app](https://github.com/hanshino/redive_linebot/blob/master/app/Dockerfile)           | 5000   | `node:lts-bullseye-slim` 包含主程式   |\n| mysql      | [mysql](https://hub.docker.com/_/mysql)                                                | 3306   | 資料庫                                |\n| redis      | [redis](https://hub.docker.com/_/redis)                                                | 6379   | 記憶體快取資料庫                      |\n| crontab    | [crontab](https://github.com/hanshino/redive_linebot/blob/master/job/Dockerfile)       |        | `node:lts-bullseye-slim` 定時排程執行 |\n| phpmyadmin | [phpmyadmin](https://hub.docker.com/r/phpmyadmin/phpmyadmin/)                          | 80     | `phpmyadmin` 資料庫管理               |\n\n可使用`docker-compose`指令水平擴展主程式，端看於個人硬體強度來做提升。\n\n### Developement\n\n開發用，將可編輯的程式掛載至容器，編輯則馬上生效\n\n- `frontend` 採用 `react-scripts` 的 開發環境建置\n- `bot` 以及 `crontab` 採用 `nodemon`\n\n| container  | image                                                                                  | expose | 說明                             |\n| ---------- | -------------------------------------------------------------------------------------- | ------ | -------------------------------- |\n| nginx      | [nginx](https://hub.docker.com/_/nginx)                                                | 5000   | `webserver`                      |\n| frontend   | [frontend](https://github.com/hanshino/redive_linebot/blob/master/frontend/Dockerfile) | 3000   | `react-frontend`                 |\n| bot        | [app](https://github.com/hanshino/redive_linebot/blob/master/app/Dockerfile)           | 5000   | `node.js:12-alpine` 包含主程式   |\n| mysql      | [mysql](https://hub.docker.com/_/mysql)                                                | 3306   | 資料庫                           |\n| redis      | [redis](https://hub.docker.com/_/redis)                                                | 6379   | 記憶體快取資料庫                 |\n| crontab    | [crontab](https://github.com/hanshino/redive_linebot/blob/master/job/Dockerfile)       |        | `node.js:12-alpine` 定時排程執行 |\n| phpmyadmin | [phpmyadmin](https://hub.docker.com/r/phpmyadmin/phpmyadmin/)                          | 8080   | `phpmyadmin` 資料庫管理          |\n\n## 目前適用聊天軟體\n\n- [Line](https://line.me/zh-hant/)\n\n## 此專案特色\n\n### 各大遊戲性功能 - 管理員用\n\n- 抽卡模擬\n- 資訊查詢（管理員自主設定指令）\n\n### 群組功能性 - 使用者用\n\n- 群組排行\n- 群組設定（自定義功能開關）\n- 等級系統\n\n### 公主連結資訊查詢 - 使用者\n\n- 角色資訊查詢\n- 戰隊報名管理\n- 官方活動查詢\n\n## 部分截圖\n\n![首頁](readmepic/home.png)\n![全群指令管理](readmepic/GlobalOrder.png)\n![轉蛋卡池](readmepic/GachaPool.png)\n\n## 事前準備\n\n- [Git](https://git-scm.com/)\n- [Docker](https://www.docker.com/)\n- [Line 機器人申請](https://manager.line.biz/)，記下 Access Token \u0026 Client Secret\n\n## 安裝方式\n\n### 前置作業\n\n1. 打開你的 CLI 跟著我一起輸入(終端機、命令提示字元、命令介面)\n2. 將專案下載到你的電腦\n\n`git clone https://github.com/hanshino/redive_linebot.git`\n\n3. 進入專案資料夾\n\n`cd redive_linebot`\n\n4. 複製環境變數範本\n\n`cp .env.example .env`\n\n5. 配置環境變數\n\n編輯 `.env` ，請務必填上所有資訊並存檔！\n\n6. 建立 `docker` 環境\n\n`make build-images`\n\n7. 安裝專案所需套件\n\n`make build-project`\n\n### 啟動專案\n\n1. `docker-compose up -d`\n2. 此時電腦的 **5000 port** 將會開啟服務，如無固定 ip 可用，可使用[ngrok](https://ngrok.com/)進行服務公開。\n\n### 額外教學 (ngrok)\n\n1. 下載[ngrok](https://ngrok.com/)\n2. 請在有`ngrok`的目錄下輸入 `ngrok http 80 --region ap` or `ngrok http 5000 --region ap`\n3. 請將網址 ex: https://xxxxxxxxxx.ap.ngrok.io/webhooks/line 複製，繼續後續動作\n\n### Line 後臺設定\n\n1. 網址預設為 `https://{your_domain}/webhooks/line`\n2. 將網址填進 [Line Account Manager](https://manager.line.biz/)\n\n## 注意事項\n\n- 要使用戰隊功能，需先跟 [Ian 戰隊系統作者](https://discord.gg/cwFc4qh)申請 Accesss Token\n- `Windows` 作業系統使用 `Docker` 需注意開啟 `hyper-v` 是否會影響自己遊玩手機模擬器。\n- 初次啟動時需耗時一段時間進行環境建置，此屬正常情況！\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanshino%2Fredive_linebot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhanshino%2Fredive_linebot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanshino%2Fredive_linebot/lists"}