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:
go-version: 1.16
- name: Tests
run: |
go test $(go list ./...)
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: latest
- name: Tests
run: |
go test $(go list ./...)
- name: Commit back
if: github.repository_owner == 'Mrs4s'
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)
}
if id == -1 {
return -1
}
return id
}

View File

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