PTT 自動簽到,最近老人在用的 PTT 終於又重新開放註冊了,我也嘗試當個老人。
- 首先右上角 Star 給他按下去,接著
fork
一份。 - 接著打開 appveyor 用一個舒服的方式登入或註冊。
- 點一下
New Project
,並找到剛剛fork
走的repo
。
- 接著點
Settings
,左邊的General
- 在同一頁面往下滾動~ 找到這幾個選像打勾
Do not build feature branches with open Pull Requests
Do not build on "Push" events
Do not build on "Pull request" events
- 點左邊的
Environment
設定環境參數
bot_token -> telegram bot token
chat_id -> telegram chat id
ptt_id_1 -> ptt 帳號 (username,passwd)
ptt_id_2 -> ptt 帳號 (username,passwd)
-
點這裡來獲取 appveyor 的
api-key
,記得選自己的帳號,接著將下方顯示的東西複製起來。
-
接著回到 GitHub 點
Settings
Secrets
New repository secret
,將剛剛複製的api-key
貼上。
-
自動同步更新原始碼,請點這裡,並點一下綠色的 Install,如果安裝過請點
Configure
。
-
Enjoy 🎉
Q: 我怎麼找到我的 bot_token
A: 先去找 @Botfather 申請一個,之後會拿到一個 token
像是 1234567:abcdefghijklmnopqrstuwxyz
Q: 我要怎麼知道 chat_id
?頻道或群組支援嗎?
A: 拆開講。
如果你要拿自己的 chat_id
直接私訊 @my_id_bot
如果你要拿頻道的 chat_id
開好一個頻道,在頻道裡面隨便打一段字,接著將那串文字轉傳給 @my_id_bot
如果你要拿群組的 chat_id
直接把 @my_id_bot 加進群組