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
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
initialencounter
koishi-plugin-adapter-wechaty
Commits
728ce407
Commit
728ce407
authored
May 11, 2023
by
initialencounter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改session.elements
parent
5523c6c9
Pipeline
#21596
passed with stages
in 3 minutes and 16 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
README.md
README.md
+1
-1
package.json
package.json
+1
-1
src/utils.ts
src/utils.ts
+6
-6
No files found.
README.md
View file @
728ce407
# koishi-plugin-adapter-wechaty
# koishi-plugin-adapter-wechaty
2
Koishi 微信适配器。
...
...
package.json
View file @
728ce407
{
"name"
:
"koishi-plugin-adapter-wechaty"
,
"name"
:
"koishi-plugin-adapter-wechaty
-whisper
"
,
"description"
:
"Koishi 微信适配器。"
,
"version"
:
"1.1.5"
,
"main"
:
"dist/src/index.js"
,
...
...
src/utils.ts
View file @
728ce407
...
...
@@ -89,22 +89,22 @@ export async function messageToElement(
break
;
case
MessageType
.
Image
:
elements
.
push
(
await
extractMessageURL
(
message
,
async
(
url
,
name
)
=>
segment
.
image
(
url
,
{
file
:
await
autoFilename
(
url
)
}
),
await
extractMessageURL
(
message
,
async
()
=>
segment
.
image
(
await
(
await
(
message
.
toFileBox
())).
toBuffer
(),
'
image/png
'
),
),
);
break
;
case
MessageType
.
Audio
:
elements
.
push
(
await
extractMessageURL
(
message
,
async
(
url
,
name
)
=>
segment
.
audio
(
url
,
{
file
:
await
autoFilename
(
url
)
}
),
await
extractMessageURL
(
message
,
async
()
=>
segment
.
audio
(
await
(
await
(
message
.
toFileBox
())).
toBuffer
(),
'
audio/wav
'
),
),
);
break
;
case
MessageType
.
Video
:
elements
.
push
(
await
extractMessageURL
(
message
,
async
(
url
,
name
)
=>
segment
.
video
(
url
,
{
file
:
await
autoFilename
(
url
)
}
),
await
extractMessageURL
(
message
,
async
()
=>
segment
.
video
(
await
(
await
(
message
.
toFileBox
())).
toBuffer
(),
'
video/mp4
'
),
),
);
break
;
...
...
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