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:
parent
ca16e4c2a7
commit
dca96982b5
8
.github/workflows/golint.yml
vendored
8
.github/workflows/golint.yml
vendored
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
12
login.go
12
login.go
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user