1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-04 19:17:37 +08:00

chore(ci): swap actions

This commit is contained in:
wdvxdr 2021-05-23 16:03:28 +08:00
parent ca16e4c2a7
commit dca96982b5
No known key found for this signature in database
GPG Key ID: 55FF1414A69CEBA6
3 changed files with 9 additions and 14 deletions

View File

@ -14,15 +14,15 @@ jobs:
with: with:
go-version: 1.16 go-version: 1.16
- name: Tests
run: |
go test $(go list ./...)
- name: golangci-lint - name: golangci-lint
uses: golangci/golangci-lint-action@v2 uses: golangci/golangci-lint-action@v2
with: with:
version: latest version: latest
- name: Tests
run: |
go test $(go list ./...)
- name: Commit back - name: Commit back
if: github.repository_owner == 'Mrs4s' if: github.repository_owner == 'Mrs4s'
continue-on-error: true continue-on-error: true

View File

@ -343,9 +343,6 @@ func (bot *CQBot) SendPrivateMessage(target int64, groupID int64, m *message.Sen
} }
log.Errorf("错误: 请先添加 %v(%v) 为好友", nickname, target) log.Errorf("错误: 请先添加 %v(%v) 为好友", nickname, target)
} }
if id == -1 {
return -1
}
return id return id
} }

View File

@ -83,16 +83,14 @@ func qrcodeLogin() error {
continue continue
} }
prevState = s.State prevState = s.State
if s.State == client.QRCodeCanceled { switch s.State {
case client.QRCodeCanceled:
log.Fatalf("扫码被用户取消.") log.Fatalf("扫码被用户取消.")
} case client.QRCodeTimeout:
if s.State == client.QRCodeTimeout {
log.Fatalf("二维码过期") log.Fatalf("二维码过期")
} case client.QRCodeWaitingForConfirm:
if s.State == client.QRCodeWaitingForConfirm {
log.Infof("扫码成功, 请在手机端确认登录.") log.Infof("扫码成功, 请在手机端确认登录.")
} case client.QRCodeConfirmed:
if s.State == client.QRCodeConfirmed {
res, err := cli.QRCodeLogin(s.LoginInfo) res, err := cli.QRCodeLogin(s.LoginInfo)
if err != nil { if err != nil {
return err return err