@napuketto/adapter 0.18.20 → 0.18.22
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/dist/index.mjs
CHANGED
|
@@ -2,5 +2,5 @@ import { d as runAction, i as BaseProtocolAdapter, n as ProtocolConfig, r as cre
|
|
|
2
2
|
import { N as kurobotConfigSchema, t as NapukettoKurobotAdapter } from "./kurobot-BUJkleqO.mjs";
|
|
3
3
|
import { r as milkyConfigSchema, t as NapukettoMilkyAdapter } from "./milky-Dj45WP4r.mjs";
|
|
4
4
|
import { t as NapukettoOneBot11Adapter, u as ob11ConfigSchema } from "./onebot11-CUK6blMn.mjs";
|
|
5
|
-
import { m as satoriConfigSchema, t as NapukettoSatoriAdapter } from "./satori-
|
|
5
|
+
import { m as satoriConfigSchema, t as NapukettoSatoriAdapter } from "./satori-CDxpqL3l.mjs";
|
|
6
6
|
export { ActionRegistry, BaseProtocolAdapter, ConfigBase, NapukettoKurobotAdapter, NapukettoMilkyAdapter, NapukettoOneBot11Adapter, NapukettoSatoriAdapter, ProtocolConfig, createServerSchema, kurobotConfigSchema, milkyConfigSchema, ob11ConfigSchema, runAction, satoriConfigSchema };
|
package/dist/satori/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { f as HTTP_STATUS, t as NapukettoSatoriAdapter, c as SatoriActionError, i as SatoriApi, n as assembleSatoriTransports, d as canonicalToSatoriElements, a as createSatoriActionRegistry, o as parseContentToCanonical, l as parseElements, u as renderElements, m as satoriConfigSchema, p as satoriHttpStatusMap, s as satoriToCanonicalElements, r as toEventSignal } from "../satori-
|
|
1
|
+
export { f as HTTP_STATUS, t as NapukettoSatoriAdapter, c as SatoriActionError, i as SatoriApi, n as assembleSatoriTransports, d as canonicalToSatoriElements, a as createSatoriActionRegistry, o as parseContentToCanonical, l as parseElements, u as renderElements, m as satoriConfigSchema, p as satoriHttpStatusMap, s as satoriToCanonicalElements, r as toEventSignal } from "../satori-CDxpqL3l.mjs";
|
|
@@ -1192,8 +1192,6 @@ function createMessageActions(deps) {
|
|
|
1192
1192
|
* Satori 表态动作:reaction.create / reaction.delete
|
|
1193
1193
|
* (reaction.clear / reaction.list:501,见 registry)
|
|
1194
1194
|
*/
|
|
1195
|
-
/** 表情 ID 默认类型(QQ 表情 id 为 qq 表情索引)。 */
|
|
1196
|
-
const EMOJI_TYPE = "1";
|
|
1197
1195
|
/** 表态动作工厂(reaction.create / reaction.delete)。 */
|
|
1198
1196
|
function createReactionActions(deps) {
|
|
1199
1197
|
return [defineSatoriAction({
|
|
@@ -1206,10 +1204,9 @@ function createReactionActions(deps) {
|
|
|
1206
1204
|
handle: async (payload) => {
|
|
1207
1205
|
const { channel_id: channelId, message_id: messageId, emoji_id: emojiId } = payload;
|
|
1208
1206
|
const peer = await deps.resolvePeer(channelId);
|
|
1209
|
-
await deps.msgApi.
|
|
1210
|
-
|
|
1207
|
+
await deps.msgApi.setMsgEmojiLikeById(peer, {
|
|
1208
|
+
msgId: messageId,
|
|
1211
1209
|
emojiId,
|
|
1212
|
-
emojiType: EMOJI_TYPE,
|
|
1213
1210
|
like: true
|
|
1214
1211
|
});
|
|
1215
1212
|
}
|
|
@@ -1226,10 +1223,9 @@ function createReactionActions(deps) {
|
|
|
1226
1223
|
const { channel_id: channelId, message_id: messageId, emoji_id: emojiId, user_id: userId } = payload;
|
|
1227
1224
|
if (userId !== void 0) throw kernelError("暂不支持删除他人表态", "INVALID_PARAM");
|
|
1228
1225
|
const peer = await deps.resolvePeer(channelId);
|
|
1229
|
-
await deps.msgApi.
|
|
1230
|
-
|
|
1226
|
+
await deps.msgApi.setMsgEmojiLikeById(peer, {
|
|
1227
|
+
msgId: messageId,
|
|
1231
1228
|
emojiId,
|
|
1232
|
-
emojiType: EMOJI_TYPE,
|
|
1233
1229
|
like: false
|
|
1234
1230
|
});
|
|
1235
1231
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@napuketto/adapter",
|
|
4
|
-
"version": "0.18.
|
|
4
|
+
"version": "0.18.22",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Protocol adapters (OneBot11 / Satori / KuroBot / Milky) for NapukettoQQ",
|
|
7
7
|
"keywords": [
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
"dev": "tsdown --watch"
|
|
84
84
|
},
|
|
85
85
|
"dependencies": {
|
|
86
|
-
"@napuketto/kernel": "^0.16.
|
|
87
|
-
"@napuketto/media": "^0.2.
|
|
86
|
+
"@napuketto/kernel": "^0.16.4",
|
|
87
|
+
"@napuketto/media": "^0.2.3",
|
|
88
88
|
"@napuketto/network": "^0.4.5",
|
|
89
89
|
"zod": "^4.6.7"
|
|
90
90
|
},
|