{"id":17492050,"url":"https://github.com/waynechang65/tosmm","last_synced_at":"2025-04-22T20:16:42.423Z","repository":{"id":40250668,"uuid":"217249797","full_name":"WayneChang65/tosmm","owner":"WayneChang65","description":"土司小妹ロボ (Linebot) 是一個LINE機器人，主要提供神魔之塔遊戲相關的群組服務。","archived":false,"fork":false,"pushed_at":"2024-03-09T15:49:19.000Z","size":12998,"stargazers_count":8,"open_issues_count":12,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-22T20:16:34.337Z","etag":null,"topics":["javascript","line","linebot","linebot-webhook","nodejs","tos"],"latest_commit_sha":null,"homepage":"https://ppt.cc/flQPvx","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/WayneChang65.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}},"created_at":"2019-10-24T08:28:49.000Z","updated_at":"2023-03-22T05:48:53.000Z","dependencies_parsed_at":"2024-01-27T15:35:24.623Z","dependency_job_id":"4722f738-7ee9-4502-b485-267a3f8a7664","html_url":"https://github.com/WayneChang65/tosmm","commit_stats":null,"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WayneChang65%2Ftosmm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WayneChang65%2Ftosmm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WayneChang65%2Ftosmm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WayneChang65%2Ftosmm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WayneChang65","download_url":"https://codeload.github.com/WayneChang65/tosmm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250316067,"owners_count":21410476,"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":["javascript","line","linebot","linebot-webhook","nodejs","tos"],"created_at":"2024-10-19T08:07:14.584Z","updated_at":"2025-04-22T20:16:42.399Z","avatar_url":"https://github.com/WayneChang65.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/WayneChang65/tosmm/master/img/mm640.png\"\u003e\n\u003c/p\u003e\n\u003ch1 align=\"center\"\u003e土司小妹ロボ\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e這是一個\u003cb\u003eLINE機器人\u003c/b\u003e，主要提供\u003cb\u003e神魔之塔\u003c/b\u003e遊戲相關的群組服務。\u003c/p\u003e  \n\n# tosmm  \n[![GitHub](https://img.shields.io/github/v/tag/waynechang65/tosmm)](https://github.com/WayneChang65/tosmm/releases)\n[![GitHub](https://img.shields.io/github/license/waynechang65/tosmm)](https://github.com/WayneChang65/tosmm/)  \n[![TOSMM](https://img.shields.io/badge/dynamic/json?color=ff69b4\u0026label=%E5%9C%9F%E5%8F%B8%E5%B0%8F%E5%A6%B9%E3%83%AD%E3%83%9C\u0026query=online\u0026url=https%3A%2F%2Fbot-api.wayne65.com%2Ftosmm%2Fstatus)](https://github.com/WayneChang65/tosmm) [![Counts](https://img.shields.io/badge/dynamic/json?color=ff69b4\u0026label=%E7%B8%BD%E4%BA%BA%E6%95%B8\u0026prefix=%20\u0026query=counts\u0026suffix=%20%E4%BA%BA\u0026url=https%3A%2F%2Fbot-api.wayne65.com%2Ftosmm%2Fstatistics%2Fusers)](https://github.com/WayneChang65/tosmm) [![Groups](https://img.shields.io/badge/dynamic/json?color=ff69b4\u0026label=%E7%B8%BD%E7%BE%A4%E7%B5%84%E6%95%B8\u0026prefix=%20\u0026query=active\u0026suffix=%20%E7%BE%A4\u0026url=https%3A%2F%2Fbot-api.wayne65.com%2Ftosmm%2Fstatistics%2Fgroups)](https://github.com/WayneChang65/tosmm)  \n\n這是一個LINE機器人([LINE](https://line.me/zh-hant/) bot)，主要提供[神魔之塔](https://towerofsaviors.com/)遊戲相關的群組服務。除此之外，也是個人在業餘為了滿足軟體工程師靈魂所打造的小玩具。  \n\n## 前言 (Overview)  \n**土司小妹ロボ Line群組機器人** 被製作出來與被使用已超過二年了，初期功能不多，只在友好的幾個群組(蘇坦納超人, FirstBlood, ...)中被測試與使用。後來，漸漸越多群組加入之後，依使用者需求回饋，功能也越來越完整，甚至連群組管理者的功能都加上去。\n**土司小妹ロボ Line群組機器人** 主要的目的很簡單，就是.... **為了讓遊戲群組能更熱鬧**、讓群組內的交流能更多，並且在群組中激發點樂趣....嗯，是否注意到哪兩個字被說了三次？\"群組\"，對，就是群組。土司小妹ロボ就是為\"群組\"而生，所以要使用她，必須將她加入群組。  \n\n另外，也設立了FB粉絲團，提供一個事項建議或問題解答的窗口。[土司小妹](https://www.facebook.com/TosMM.Linebot)  \n\n## 開放原始碼 (Open Source)\n希望更多人發揮創意，希望更多人可以讓這個專案更完整。   \n自己從開放式原始碼學習到相當相當多知識，從中收穫不少。因此，開放原始碼一直是規畫中的事。不過，各位也知道，宅男工程師寫Code容易，寫文件或整理資料可難如登天。要開放原始碼，就要把Code進行整理，就猶如把萬年倉庫清理一般地困難。~~好吧，從規畫要開放程式碼到現在也超過半年了~~... \u003e.\u003c  \n\n雖然拖拖拖拖個老半天，至少現在也成功開放了。(汗)\n\n## 詳細的功能說明 (Feature)  \n請參考以下網站  \n[土司小妹ロボ功能介紹](http://wayne65.ap.ngrok.io/wp/%e5%9c%9f%e5%8f%b8%e5%b0%8f%e5%a6%b9%e3%83%ad%e3%83%9c%e5%8a%9f%e8%83%bd%e4%bb%8b%e7%b4%b9/)  \n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/WayneChang65/tosmm/master/img/tosmm.gif\" width=\"30%\" height=\"30%\"\u003e\n\u003c/p\u003e\n\n## 安裝與執行 (Install and Run)\n* 首先在執行這個程式的使用者家目錄(Home Directiory)下，置入名為**client_secret.json**檔案。這個檔案，是針對存取Google Spreadsheet所需要的認證碼。(要到Google網站申請)  \n\n* 設定以下環境變數。因為其中用到LINE、Google Spreadsheet、Bitly，所以必須要申請這些服務的Access Key/Token。也會用到相關的圖片資料，所以要有相關的圖床URL(Line規定要https)。  \n\n```javascript\n##########################################\n#        TosMM Linebot Keys              #\n##########################################\n\n# Super User的群組idx (通常機器人加第一個群組，這群組編號就是0)\nexport TOSMM_SU_GIDX=\"0\"\n# 本服務開啟的Port (Port可改)\nexport PORT_WATER=\"3210\"\n# LINE Channel ID\nexport CHANNEL_ID_WATER=\"15xxxxxxx\"\n# LINE Channel Secret\nexport CHANNEL_SECRET_WATER=\"0a3exxxxxxxxxxxxxxxxxx\"\n# LINE Channel Access token\nexport CHANNEL_ACCESS_TOKEN_WATER=\"hLxxxxxxxxxxxxx\"\n# 測試用頻道 Super User的群組idx。(以實際編號為主) (Optional)\nexport TOSMM_SU_GIDX_FIRE=\"633\"\n# 測試用頻道 服務開啟的Port (Port可改) (Optional)\nexport PORT_FIRE=\"3310\"\n# 測試用頻道 LINE Channel ID (Optional)\nexport CHANNEL_ID_FIRE=\"16xxxxxxxxx\"\n# 測試用頻道 LINE Channel Secret (Optional)\nexport CHANNEL_SECRET_FIRE=\"797xxxxxxxxxxxxxxx\"\n# 測試用頻道 LINE Channel Access token (Optional)\nexport CHANNEL_ACCESS_TOKEN_FIRE=\"srd5xxxxxxxxxxxxxxxxxx\"\n# LINE Client APP User ID\nexport CLIENT_APP_USER_ID=\"U8xxxxxxxxxxxxxxxxxxxx\"\n\n##########################################\n#        Path of drawing cards           #\n##########################################\n\n# 神魔之塔抽卡系列的圖片代碼 (代表圖片目錄名稱)\nexport TOSMM_TORO_SERIES=\"deo\"\n# 神魔之塔相關圖片目錄最上層URL\nexport TOSMM_TORO_PIC_PATH=\"https://xxx.xxx.xxx/lb_images/\"\n# 神魔之塔抽卡圖片URL\nexport TOSMM_TORO_PIC_PATH_TOS=\"https://xxx.xxx.xxx/lb_images/tos_img/\"\n# 抽卡機率 圖片URL\nexport TOSMM_TORO_PIC_PATH_TCHANCE=\"https://xxx.xxx.xxx/lb_images/tosp_img/toro.jpg\"\n# 加倍機率 圖片URL\nexport TOSMM_TORO_PIC_PATH_TCHANCED=\"https://xxx.xxx.xxx/lb_images/tosp_img/toro_d.jpg\"\n# 運勢 圖片URL\nexport TOSMM_TORO_PIC_PATH_ASA=\"https://xxx.xxx.xxx/lb_images/asa_img/\"\n# 超人運勢 圖片URL\nexport TOSMM_TORO_PIC_PATH_SM_ASA=\"https://xxx.xxx.xxx/lb_images/sm_asa_img/\"\n# 抽籤 圖片URL\nexport TOSMM_TORO_PIC_PATH_KUZI=\"https://xxx.xxx.xxx/lb_images/kuzi_img/\"\n# 暫存檔 URL\nexport TOSMM_TORO_PIC_PATH_TEMP=\"https://xxx.xxx.xxx/lb_images/tos_img/temp/\"\n# LINE Flex使用的圖片 URL\nexport TOSMM_TORO_PIC_PATH_FLEX=\"https://xxx.xxx.xxx/lb_images/flex/\"\n\n##########################################\n#          Email Bug Report              #\n##########################################\n\nexport BUG_REPORT_EMAIL_USER=\"waxxxxxx\"\nexport BUG_REPORT_EMAIL_PASSWORD=\"yxxxxxxxxx\"\nexport BUG_REPORT_EMAIL_SERVER_PORT=\"465\"\nexport BUG_REPORT_EMAIL_HOST=\"smtp.gmail.com\"\nexport BUG_REPORT_EMAIL_SSL=\"true\"\nexport BUG_REPORT_EMAIL_FROM=\"土司小妹 \u003cusername@your-email.com\u003e\"\nexport BUG_REPORT_EMAIL_TO=\"Wayne \u003cxxxxx@gmail.com\u003e\"\nexport BUG_REPORT_EMAIL_CC=\"Wayne_CC \u003cxxxxxxx@gmail.com\u003e\"\n\n##########################################\n#   BITLY Keys - Shorten hyper-links     #\n##########################################\n\nexport TOSMM_BITLY_KEY=\"652xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\nexport TOSMM_BITLY_1_KEY=\"98xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\nexport TOSMM_BITLY_2_KEY=\"690xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\nexport TOSMM_BITLY_3_KEY=\"750xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\nexport TOSMM_BITLY_4_KEY=\"d71xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\nexport TOSMM_BITLY_5_KEY=\"464xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\nexport TOSMM_BITLY_6_KEY=\"7e3xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\nexport TOSMM_BITLY_7_KEY=\"037xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n\n##########################################\n#        Google Spreadsheet IDs          #\n##########################################\n\nexport TOSMM_GSID_WTESTWATER=\"1Bjxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\nexport TOSMM_GSID_SUPERMAN=\"1qvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\nexport TOSMM_GSID_MAGGYBAN=\"1Kuxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\nexport TOSMM_GSID_LIULUNG=\"14ixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\nexport TOSMM_GSID_YOSEITAIL=\"1xAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\nexport TOSMM_GSID_FUGUAN=\"1d2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\nexport TOSMM_GSID_AUSHE=\"1zVxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"  \n```\n\n* 從Github下載程式碼 \n```\ngit clone https://github.com/WayneChang65/tosmm.git\n```\n\n* 進入tosmm目錄\n```\ncd tosmm\n```\n\n* 安裝json檔案 (群組與使用資料存取)\n```\ngit clone https://github.com/WayneChang65/tosmm_empty_json.git json\n```\n\n* 安裝執行環境套件\n```\nnpm install\n```\n\n* 執行程式\n```\nnode index.js water\n```\n\n* 通常會遇到的問題\n  * **程式跑起來有錯誤** ==\u003e 先檢查是否所有環境變數都正確設定，相關服務的Secret是否正確。\n  * **抽卡的圖出不來** ==\u003e 檢查環境變數相關的URL是否正確，而且要*https*。\n  * **管理者相關的指令無效** ==\u003e 確認環境變數中 TOSMM_SU_GIDX是否正確被設定。(如果這個機器人只要加第一個群組，通常設定0。)\n  * **設定固定時間的Timer時間不太對** ==\u003e 因為我的系統時間是英國時間(BST)，所以跟台灣有8小時時差。解法有兩種，將您的系統時間設定為英國，或是改Code.\n  * **不想申請這麼多服務Secret，也不想Run這麼多功能，該怎麼做？** ==\u003e 即然您有興趣，且都Clone Code了，就手動把相關的地方Mark掉即可。您可以辦得到的。  \n\n\n## LOGO   \n[Tony @a032356469](https://twitter.com/a032356469)：土司小妹ロボ大頭貼設計者，也是一名專業畫師  \n\n## 貢獻一己之力 (Contribution)\ntosmm 應該是本人自己業餘寫過最大的專案了，從無中生有到現在亭亭玉立了。不過，她尚未完美，因此希望這個專案能夠持續進步！若有發現臭蟲(bug)或問題，請幫忙在Issue留言告知詳細情形。  \n歡迎共同開發。歡迎Fork / Pull Request，謝謝。:)  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaynechang65%2Ftosmm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaynechang65%2Ftosmm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaynechang65%2Ftosmm/lists"}