feat: 添加telegram交互模式

This commit is contained in:
johlanse 2021-11-28 09:48:50 +08:00
parent de079c92b1
commit 010a035602
2 changed files with 3 additions and 1 deletions

View File

@ -15,6 +15,7 @@
+ windows环境推荐直接打开浏览器扫码或者在控制台出现二维码后打开当前目录```screen.png```进行扫码 + windows环境推荐直接打开浏览器扫码或者在控制台出现二维码后打开当前目录```screen.png```进行扫码
+ 其他无头浏览环境请配置[pushplus](http://www.pushplus.plus/) 推送进行扫码 + 其他无头浏览环境请配置[pushplus](http://www.pushplus.plus/) 推送进行扫码
## 配置文件 ## 配置文件
```yaml ```yaml
# 刷课模式默认为3 # 刷课模式默认为3

View File

@ -207,7 +207,7 @@ func study(bot *Telegram, args []string) {
pw: nil, pw: nil,
browser: nil, browser: nil,
context: nil, context: nil,
ShowBrowser: false, ShowBrowser: true,
Push: func(kind string, message string) { Push: func(kind string, message string) {
switch { switch {
case kind == "image": case kind == "image":
@ -223,6 +223,7 @@ func study(bot *Telegram, args []string) {
} }
}, },
} }
core.Init()
defer core.Quit() defer core.Quit()
core.LearnArticle(cookies) core.LearnArticle(cookies)
core.LearnVideo(cookies) core.LearnVideo(cookies)