Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
G
go-cqhttp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
go-cqhttp
Commits
322b70c6
Commit
322b70c6
authored
Aug 20, 2020
by
Mrs4s
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug.
parent
470efa07
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
coolq/bot.go
coolq/bot.go
+12
-5
No files found.
coolq/bot.go
View file @
322b70c6
...
...
@@ -151,16 +151,23 @@ func (bot *CQBot) SendPrivateMessage(target int64, m *message.SendingMessage) in
newElem
=
append
(
newElem
,
elem
)
}
m
.
Elements
=
newElem
var
id
int32
var
id
int32
=
-
1
if
bot
.
Client
.
FindFriend
(
target
)
!=
nil
{
id
=
bot
.
Client
.
SendPrivateMessage
(
target
,
m
)
.
Id
msg
:=
bot
.
Client
.
SendPrivateMessage
(
target
,
m
)
if
msg
!=
nil
{
id
=
msg
.
Id
}
}
else
{
if
code
,
ok
:=
bot
.
tempMsgCache
.
Load
(
target
);
ok
{
id
=
bot
.
Client
.
SendTempMessage
(
code
.
(
int64
),
target
,
m
)
.
Id
}
else
{
return
-
1
msg
:=
bot
.
Client
.
SendTempMessage
(
code
.
(
int64
),
target
,
m
)
if
msg
!=
nil
{
id
=
msg
.
Id
}
}
}
if
id
==
-
1
{
return
-
1
}
return
ToGlobalId
(
target
,
id
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment