@zhin.js/adapter-discord 7.0.14 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/adapters/discord.js +3 -1
- package/adapters/discord.ts +3 -1
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @zhin.js/adapter-discord
|
|
2
2
|
|
|
3
|
+
## 8.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f2c532f: Expose exact per-Endpoint message operations through one validated Adapter capability model, route Core control calls through declared active capabilities, and connect existing recall, edit, reaction, and typing implementations across platform adapters.
|
|
8
|
+
- Updated dependencies [b10d058]
|
|
9
|
+
- Updated dependencies [f2c532f]
|
|
10
|
+
- Updated dependencies [3dbf990]
|
|
11
|
+
- @zhin.js/host-http@1.0.12
|
|
12
|
+
- @zhin.js/adapter@1.2.0
|
|
13
|
+
- @zhin.js/core@1.5.13
|
|
14
|
+
- @zhin.js/agent@1.1.15
|
|
15
|
+
- zhin.js@6.0.13
|
|
16
|
+
|
|
3
17
|
## 7.0.14
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/adapters/discord.js
CHANGED
|
@@ -11,7 +11,9 @@ import { discordRuntimeStateToken } from "../lib/discord-runtime-state.js";
|
|
|
11
11
|
export { DiscordGatewayEndpoint, DiscordInteractionsEndpoint, } from "../lib/endpoint.js";
|
|
12
12
|
export default defineAdapter({
|
|
13
13
|
capabilities: ['inbound', 'outbound'],
|
|
14
|
-
operations:
|
|
14
|
+
operations: (context) => context.config.connection === 'interactions'
|
|
15
|
+
? ['recall']
|
|
16
|
+
: ['recall', 'reaction'],
|
|
15
17
|
// 媒体 url 直发或由 AttachmentBuilder 物化本地文件上传;message components 原生按钮承载交互段。
|
|
16
18
|
segments: {
|
|
17
19
|
outboundMedia: ['url', 'upload'],
|
package/adapters/discord.ts
CHANGED
|
@@ -27,7 +27,9 @@ export type {
|
|
|
27
27
|
|
|
28
28
|
export default defineAdapter<DiscordAdapterConfig>({
|
|
29
29
|
capabilities: ['inbound', 'outbound'],
|
|
30
|
-
operations:
|
|
30
|
+
operations: (context) => context.config.connection === 'interactions'
|
|
31
|
+
? ['recall']
|
|
32
|
+
: ['recall', 'reaction'],
|
|
31
33
|
// 媒体 url 直发或由 AttachmentBuilder 物化本地文件上传;message components 原生按钮承载交互段。
|
|
32
34
|
segments: {
|
|
33
35
|
outboundMedia: ['url', 'upload'],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhin.js/adapter-discord",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "Zhin.js Discord adapter for Plugin Runtime (Gateway WebSocket)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -33,20 +33,20 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"discord.js": "^14.27.0",
|
|
36
|
-
"@zhin.js/adapter": "1.
|
|
37
|
-
"@zhin.js/core": "1.5.
|
|
38
|
-
"@zhin.js/host-http": "1.0.
|
|
36
|
+
"@zhin.js/adapter": "1.2.0",
|
|
37
|
+
"@zhin.js/core": "1.5.13",
|
|
38
|
+
"@zhin.js/host-http": "1.0.12",
|
|
39
39
|
"@zhin.js/im-contract": "1.0.4",
|
|
40
40
|
"@zhin.js/logger": "1.0.76",
|
|
41
41
|
"@zhin.js/permission": "1.0.3"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"zod": "^4.0.0",
|
|
45
|
-
"@zhin.js/adapter": "1.
|
|
46
|
-
"@zhin.js/agent": "1.1.
|
|
45
|
+
"@zhin.js/adapter": "1.2.0",
|
|
46
|
+
"@zhin.js/agent": "1.1.15",
|
|
47
47
|
"@zhin.js/command": "1.0.15",
|
|
48
|
-
"@zhin.js/core": "1.5.
|
|
49
|
-
"zhin.js": "6.0.
|
|
48
|
+
"@zhin.js/core": "1.5.13",
|
|
49
|
+
"zhin.js": "6.0.13"
|
|
50
50
|
},
|
|
51
51
|
"peerDependenciesMeta": {
|
|
52
52
|
"@zhin.js/agent": {
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
"typescript": "^6.0.3",
|
|
68
68
|
"vitest": "^4.1.10",
|
|
69
69
|
"zod": "^4.4.3",
|
|
70
|
-
"@zhin.js/agent": "1.1.
|
|
71
|
-
"@zhin.js/host-http": "1.0.
|
|
72
|
-
"zhin.js": "6.0.
|
|
70
|
+
"@zhin.js/agent": "1.1.15",
|
|
71
|
+
"@zhin.js/host-http": "1.0.12",
|
|
72
|
+
"zhin.js": "6.0.13"
|
|
73
73
|
},
|
|
74
74
|
"files": [
|
|
75
75
|
"adapters",
|