Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
koishi-plugin-adapter-wechaty
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
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
3rdeye
koishi-plugin-adapter-wechaty
Commits
60ebbdfc
Commit
60ebbdfc
authored
Dec 20, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bad console.log
parent
5a4fdf1d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
dev/index.ts
dev/index.ts
+1
-1
src/utils.ts
src/utils.ts
+3
-5
No files found.
dev/index.ts
View file @
60ebbdfc
import
{
App
,
segment
}
from
'
koishi
'
;
import
TargetPlugin
from
'
../
src
'
;
import
TargetPlugin
from
'
../
dist
'
;
import
*
as
Help
from
'
@koishijs/plugin-help
'
;
import
ExtrasInDev
from
'
./extras
'
;
import
fs
from
'
fs
'
;
...
...
src/utils.ts
View file @
60ebbdfc
import
{
segment
,
Universal
,
Element
,
Awaitable
}
from
'
koishi
'
;
import
{
ContactInterface
}
from
'
wechaty/src/user-modules/contact
'
;
import
{
RoomInterface
}
from
'
wechaty/src/user-modules/room
'
;
import
{
MessageInterface
}
from
'
wechaty/src/user-modules/message
'
;
import
type
{
ContactInterface
}
from
'
wechaty/src/user-modules/contact
'
;
import
type
{
RoomInterface
}
from
'
wechaty/src/user-modules/room
'
;
import
type
{
MessageInterface
}
from
'
wechaty/src/user-modules/message
'
;
import
WechatyBot
from
'
./index
'
;
import
FileType
from
'
file-type
'
;
...
...
@@ -80,10 +80,8 @@ export async function messageToElement(
let
text
=
message
.
text
();
for
(
const
mention
of
mentions
)
{
const
name
=
mention
.
name
();
console
.
log
(
'
mention
'
,
name
);
text
=
text
.
replace
(
new
RegExp
(
`@
${
name
}
\\s+`
,
'
g
'
),
''
);
}
console
.
log
(
text
);
elements
.
push
(
segment
.
text
(
text
));
break
;
case
MessageType
.
Image
:
...
...
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