kotori-plugin-requester 1.0.1 → 1.1.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/lib/index.d.ts CHANGED
@@ -1,6 +1,11 @@
1
1
  import { Context, Tsu } from 'kotori-bot';
2
2
  export declare const lang: string[];
3
3
  export declare const config: import("kotori-bot").ObjectParser<{
4
+ print: import("kotori-bot").BooleanParser;
5
+ filterCmd: import("kotori-bot").BooleanParser;
6
+ onHttpRequest: import("kotori-bot").UnionParser<[import("kotori-bot").BooleanParser, import("kotori-bot").CustomParser<("get" | "options" | "delete" | "head" | "post" | "put" | "patch" | "ws")[]>]>;
7
+ onRegexp: import("kotori-bot").BooleanParser;
8
+ onCommand: import("kotori-bot").BooleanParser;
4
9
  onBotGroupIncrease: import("kotori-bot").BooleanParser;
5
10
  onBotGroupDecrease: import("kotori-bot").BooleanParser;
6
11
  onBotGroupAdmin: import("kotori-bot").BooleanParser;
@@ -13,4 +18,4 @@ export declare const config: import("kotori-bot").ObjectParser<{
13
18
  onPrivateMsg: import("kotori-bot").BooleanParser;
14
19
  }>;
15
20
  export declare const inject: string[];
16
- export declare function main(ctx: Context, con: Tsu.infer<typeof config>): void;
21
+ export declare function main(ctx: Context, cfg: Tsu.infer<typeof config>): void;
package/lib/index.js CHANGED
@@ -1,122 +1,206 @@
1
+
2
+ /**
3
+ * @Package kotori-plugin-requester
4
+ * @Version 1.0.1
5
+ * @Author Himeno <biyuehuya@gmail.com>
6
+ * @Copyright 2024 Hotaru. All rights reserved.
7
+ * @License GPL-3.0
8
+ * @Link https://github.com/kotorijs/kotori
9
+ * @Date 2024/6/6 21:03:50
10
+ */
11
+
1
12
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.main = exports.inject = exports.config = exports.lang = void 0;
4
- const kotori_bot_1 = require("kotori-bot");
5
- exports.lang = [__dirname, '../locales'];
6
- exports.config = kotori_bot_1.Tsu.Object({
7
- onBotGroupIncrease: kotori_bot_1.Tsu.Boolean().default(true),
8
- onBotGroupDecrease: kotori_bot_1.Tsu.Boolean().default(true),
9
- onBotGroupAdmin: kotori_bot_1.Tsu.Boolean().default(true),
10
- onBotGroupBan: kotori_bot_1.Tsu.Boolean().default(true),
11
- onGroupRecall: kotori_bot_1.Tsu.Boolean().default(true),
12
- onPrivateRecall: kotori_bot_1.Tsu.Boolean().default(true),
13
- onGroupRequest: kotori_bot_1.Tsu.Boolean().default(true),
14
- onPrivateRequest: kotori_bot_1.Tsu.Boolean().default(true),
15
- onGroupMsg: kotori_bot_1.Tsu.Boolean().default(true),
16
- onPrivateMsg: kotori_bot_1.Tsu.Boolean().default(true)
13
+ var __defProp = Object.defineProperty;
14
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
15
+ var __getOwnPropNames = Object.getOwnPropertyNames;
16
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
17
+ var __export = (target, all) => {
18
+ for (var name in all)
19
+ __defProp(target, name, { get: all[name], enumerable: true });
20
+ };
21
+ var __copyProps = (to, from, except, desc) => {
22
+ if (from && typeof from === "object" || typeof from === "function") {
23
+ for (let key of __getOwnPropNames(from))
24
+ if (!__hasOwnProp.call(to, key) && key !== except)
25
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
26
+ }
27
+ return to;
28
+ };
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+
31
+ // src/index.ts
32
+ var src_exports = {};
33
+ __export(src_exports, {
34
+ config: () => config,
35
+ inject: () => inject,
36
+ lang: () => lang,
37
+ main: () => main
17
38
  });
18
- exports.inject = ['cache'];
19
- function main(ctx, con) {
20
- const send = (session) => (msg) => {
21
- let handle = msg;
22
- if (typeof handle !== 'string')
23
- handle = session.format(...handle);
24
- else
25
- handle = session.i18n.locale(handle);
26
- session.api.sendPrivateMsg(handle, session.api.adapter.config.master);
27
- };
28
- if (con.onBotGroupIncrease) {
29
- ctx.on('on_group_increase', (session) => {
30
- if (session.userId !== session.api.adapter.selfId)
31
- return;
32
- send(session)([`requester.msg.increase`, { operator: session.operatorId, group: session.groupId }]);
33
- });
34
- }
35
- if (con.onBotGroupDecrease) {
36
- ctx.on('on_group_decrease', (session) => {
37
- if (session.userId !== session.api.adapter.selfId)
38
- return;
39
- send(session)([
40
- `requester.msg.decrease.${session.operatorId === session.userId ? 'leave' : 'kick'}`,
41
- { operator: session.operatorId, group: session.groupId }
42
- ]);
43
- });
44
- }
45
- if (con.onBotGroupAdmin) {
46
- ctx.on('on_group_admin', (session) => {
47
- if (session.userId !== session.api.adapter.selfId)
48
- return;
49
- send(session)([`requester.msg.admin.${session.userId ? 'set' : 'unset'}`, { group: session.groupId }]);
50
- });
51
- }
52
- if (con.onBotGroupBan) {
53
- ctx.on('on_group_ban', (session) => {
54
- if (session.userId !== session.api.adapter.selfId)
55
- return;
56
- send(session)([
57
- `requester.msg.ban.${session.time > 0 ? 'ban' : 'lift_ban'}`,
58
- {
59
- operator: session.operatorId,
60
- group: session.groupId,
61
- time: session.time ? session.time / 60 : 0
62
- }
63
- ]);
64
- });
65
- }
66
- if (con.onPrivateRecall || con.onGroupRecall) {
67
- ctx.on('on_recall', (session) => {
68
- if (session.userId === session.api.adapter.selfId || session.operatorId === session.api.adapter.selfId)
69
- return;
70
- if (con.onPrivateRecall && session.type === kotori_bot_1.MessageScope.PRIVATE) {
71
- const message = ctx.cache.get(`${session.api.adapter.platform}${session.messageId}`);
72
- if (!message)
73
- return;
74
- send(session)([`requester.msg.recall.private`, { user: session.userId, message }]);
75
- }
76
- else if (con.onGroupRecall && session.type === kotori_bot_1.MessageScope.GROUP) {
77
- const message = ctx.cache.get(`${session.api.adapter.platform}${session.messageId}`);
78
- if (!message)
79
- return;
80
- send(session)([
81
- `requester.msg.recall.group.${session.operatorId === session.userId ? 'self' : 'other'}`,
82
- { user: session.userId, operator: session.operatorId, message, group: session.groupId }
83
- ]);
84
- }
85
- });
86
- }
87
- if (con.onPrivateRequest || con.onGroupRequest) {
88
- ctx.on('on_request', (session) => {
89
- if (con.onPrivateRequest && session.type === kotori_bot_1.MessageScope.PRIVATE) {
90
- send(session)([`requester.msg.request.private`, { user: session.userId }]);
91
- }
92
- else if (con.onGroupMsg && session.type === kotori_bot_1.MessageScope.GROUP) {
93
- send(session)([`requester.msg.request.group`, { user: session.userId, group: session.groupId }]);
94
- }
95
- });
96
- }
97
- if (con.onGroupMsg || con.onPrivateMsg) {
98
- ctx.on('on_message', (session) => {
99
- if (session.userId === session.api.adapter.selfId)
100
- return;
101
- if (session.type === kotori_bot_1.MessageScope.GROUP) {
102
- if (con.onGroupRecall) {
103
- ctx.cache.set(`${session.api.adapter.platform}${session.messageId}`, session.message);
104
- }
105
- /* if (con.onGroupMsg && session.message.includes(String(session.api.adapter.selfId))) {
106
- send(session)([
107
- `requester.msg.msg.group`,
108
- { user: session.userId, group: session.groupId, message: session.message }
109
- ]);
110
- }
111
- return; */
112
- }
113
- if (con.onPrivateRecall) {
114
- ctx.cache.set(`${session.api.adapter.platform}${session.messageId}`, session.message);
115
- }
116
- if (con.onPrivateMsg && String(session.userId) !== String(session.api.adapter.config.master)) {
117
- send(session)([`requester.msg.msg.private`, { user: session.userId, message: session.message }]);
118
- }
39
+ module.exports = __toCommonJS(src_exports);
40
+ var import_kotori_bot = require("kotori-bot");
41
+ var lang = [__dirname, "../locales"];
42
+ var config = import_kotori_bot.Tsu.Object({
43
+ print: import_kotori_bot.Tsu.Boolean().default(true),
44
+ filterCmd: import_kotori_bot.Tsu.Boolean().default(true),
45
+ onHttpRequest: import_kotori_bot.Tsu.Union([
46
+ import_kotori_bot.Tsu.Boolean(),
47
+ import_kotori_bot.Tsu.Custom(
48
+ (input) => Array.isArray(input) && input.filter((el) => !["get", "post", "put", "delete", "patch", "head", "options", "ws"].includes(String(el))).length === 0
49
+ )
50
+ ]).default(["get", "post", "put", "delete", "patch"]),
51
+ onRegexp: import_kotori_bot.Tsu.Boolean().default(true),
52
+ onCommand: import_kotori_bot.Tsu.Boolean().default(true),
53
+ onBotGroupIncrease: import_kotori_bot.Tsu.Boolean().default(true),
54
+ onBotGroupDecrease: import_kotori_bot.Tsu.Boolean().default(true),
55
+ onBotGroupAdmin: import_kotori_bot.Tsu.Boolean().default(true),
56
+ onBotGroupBan: import_kotori_bot.Tsu.Boolean().default(true),
57
+ onGroupRecall: import_kotori_bot.Tsu.Boolean().default(true),
58
+ onPrivateRecall: import_kotori_bot.Tsu.Boolean().default(true),
59
+ onGroupRequest: import_kotori_bot.Tsu.Boolean().default(true),
60
+ onPrivateRequest: import_kotori_bot.Tsu.Boolean().default(true),
61
+ onGroupMsg: import_kotori_bot.Tsu.Boolean().default(true),
62
+ onPrivateMsg: import_kotori_bot.Tsu.Boolean().default(true)
63
+ });
64
+ var inject = ["cache"];
65
+ function main(ctx, cfg) {
66
+ const log = (identity, ...args) => {
67
+ if (cfg.print) ctx.logger.label(identity).record(...args);
68
+ };
69
+ const send = (session) => (msg) => {
70
+ if (cfg.filterCmd && session.api.adapter.platform === "cmd") return;
71
+ const isString = typeof msg === "string";
72
+ session.api.sendPrivateMsg(
73
+ isString ? session.i18n.locale(msg) : session.format(msg[0], msg[1]),
74
+ session.api.adapter.config.master
75
+ );
76
+ log(
77
+ session.api.adapter.identity,
78
+ isString ? session.i18n.locale(msg.replace(".msg.", ".log.")) : session.format(msg[0].replace(".msg.", ".log."), msg[1])
79
+ );
80
+ };
81
+ if (cfg.onBotGroupIncrease) {
82
+ ctx.on("on_group_increase", (session) => {
83
+ if (session.userId !== session.api.adapter.selfId) return;
84
+ send(session)([`requester.msg.increase`, [session.groupId]]);
85
+ });
86
+ }
87
+ if (cfg.onBotGroupDecrease) {
88
+ ctx.on("on_group_decrease", (session) => {
89
+ if (session.userId !== session.api.adapter.selfId) return;
90
+ const equaled = session.operatorId === session.userId;
91
+ send(session)([
92
+ `requester.msg.decrease.${equaled ? "leave" : "kick"}`,
93
+ equaled ? [session.groupId] : [session.operatorId, session.groupId]
94
+ ]);
95
+ });
96
+ }
97
+ if (cfg.onBotGroupAdmin) {
98
+ ctx.on("on_group_admin", (session) => {
99
+ if (session.userId !== session.api.adapter.selfId) return;
100
+ send(session)([`requester.msg.admin.${session.userId ? "set" : "unset"}`, [session.groupId]]);
101
+ });
102
+ }
103
+ if (cfg.onBotGroupBan) {
104
+ ctx.on("on_group_ban", (session) => {
105
+ if (session.userId !== session.api.adapter.selfId) return;
106
+ send(session)([
107
+ `requester.msg.ban.${session.time > 0 ? "ban" : "lift_ban"}`,
108
+ [session.operatorId, session.groupId, session.time ? session.time / 60 : 0]
109
+ ]);
110
+ });
111
+ }
112
+ if (cfg.onPrivateRecall || cfg.onGroupRecall) {
113
+ ctx.on("on_recall", (session) => {
114
+ if (session.userId === session.api.adapter.selfId || session.operatorId === session.api.adapter.selfId) return;
115
+ if (cfg.onPrivateRecall && session.type === import_kotori_bot.MessageScope.PRIVATE) {
116
+ const message = ctx.cache.get(`${session.api.adapter.platform}${session.messageId}`);
117
+ if (!message) return;
118
+ send(session)([`requester.msg.recall.private`, [session.userId, message]]);
119
+ } else if (cfg.onGroupRecall && session.type === import_kotori_bot.MessageScope.GROUP) {
120
+ const message = ctx.cache.get(`${session.api.adapter.platform}${session.messageId}`);
121
+ if (!message) return;
122
+ const equaled = session.operatorId === session.userId;
123
+ send(session)([
124
+ `requester.msg.recall.group.${equaled ? "self" : "other"}`,
125
+ [session.userId, ...equaled ? [message, session.groupId] : [session.operatorId, message, session.groupId]]
126
+ ]);
127
+ }
128
+ });
129
+ }
130
+ if (cfg.onPrivateRequest || cfg.onGroupRequest) {
131
+ ctx.on("on_request", (session) => {
132
+ if (cfg.onPrivateRequest && session.type === import_kotori_bot.MessageScope.PRIVATE) {
133
+ send(session)([`requester.msg.request.private`, [session.userId]]);
134
+ } else if (cfg.onGroupMsg && session.type === import_kotori_bot.MessageScope.GROUP) {
135
+ send(session)([`requester.msg.request.group`, [session.userId, session.groupId]]);
136
+ }
137
+ });
138
+ }
139
+ if (cfg.onGroupMsg || cfg.onPrivateMsg) {
140
+ ctx.on("on_message", (session) => {
141
+ if (session.userId === session.api.adapter.selfId) return;
142
+ if (session.type === import_kotori_bot.MessageScope.GROUP && cfg.onGroupRecall) {
143
+ ctx.cache.set(`${session.api.adapter.platform}${session.messageId}`, session.message);
144
+ } else if (cfg.onPrivateRecall) {
145
+ ctx.cache.set(`${session.api.adapter.platform}${session.messageId}`, session.message);
146
+ }
147
+ if (cfg.onPrivateMsg && String(session.userId) !== String(session.api.adapter.config.master)) {
148
+ send(session)([`requester.msg.msg.private`, [session.userId, session.message]]);
149
+ }
150
+ });
151
+ }
152
+ if (cfg.onCommand) {
153
+ ctx.on(
154
+ "command",
155
+ ({ session, raw }) => log(
156
+ session.api.adapter.identity,
157
+ session.format(`requester.log.command.${session.type === import_kotori_bot.MessageScope.GROUP ? "group" : "private"}`, [
158
+ session.userId,
159
+ raw,
160
+ session.groupId
161
+ ])
162
+ )
163
+ );
164
+ }
165
+ if (cfg.onRegexp) {
166
+ ctx.on(
167
+ "regexp",
168
+ ({ session, raw }) => log(
169
+ session.api.adapter.identity,
170
+ session.format(`requester.log.regexp.${session.type === import_kotori_bot.MessageScope.GROUP ? "group" : "private"}`, [
171
+ session.userId,
172
+ raw,
173
+ session.groupId
174
+ ])
175
+ )
176
+ );
177
+ }
178
+ if (cfg.onHttpRequest) {
179
+ const originHttp = ctx.root.http;
180
+ const http = ctx.root.http;
181
+ (cfg.onHttpRequest === true ? ["get", "post", "put", "delete", "patch", "head", "options", "ws"] : cfg.onHttpRequest).forEach((method) => {
182
+ if (method === "ws") {
183
+ http.ws = new Proxy(http.ws, {
184
+ apply(target, thisArg, argArray) {
185
+ log(method, (0, import_kotori_bot.stringFormat)(ctx.i18n.locale("requester.log.http"), [argArray[0]]));
186
+ return Reflect.apply(target, thisArg, argArray);
187
+ }
119
188
  });
120
- }
189
+ return;
190
+ }
191
+ http[method] = new Proxy(http[method], {
192
+ apply(target, thisArg, argArray) {
193
+ log(method, (0, import_kotori_bot.stringFormat)(ctx.i18n.locale("requester.log.http"), [argArray[0]]));
194
+ return Reflect.apply(target, thisArg, argArray);
195
+ }
196
+ });
197
+ });
198
+ }
121
199
  }
122
- exports.main = main;
200
+ // Annotate the CommonJS export names for ESM import in node:
201
+ 0 && (module.exports = {
202
+ config,
203
+ inject,
204
+ lang,
205
+ main
206
+ });
@@ -0,0 +1,21 @@
1
+ {
2
+ "requester.log.increase": "The BOT has joined the group <bold>{0}</bold>",
3
+ "requester.log.decrease.leave": "The BOT has left the group <bold>{0}</bold>",
4
+ "requester.log.decrease.kick": "The BOT was kicked out of the group <bold>{1}</bold> by the administrator <bold>{0}</bold>",
5
+ "requester.log.admin.set": "The BOT was set as the admin of the group <bold>{0}</bold>",
6
+ "requester.log.admin.unset": "The BOT was removed from the admin position in the group <bold>{0}</bold>",
7
+ "requester.log.ban.ban": "The BOT was muted by the administrator <bold>{0}</bold> for <bold>{1}</bold> minutes in the group <bold>{2}</bold>",
8
+ "requester.log.ban.lift_ban": "The mute on the BOT was lifted by the administrator <green>{0}</green> in the group <bold>{1}</bold>",
9
+ "requester.log.recall.group.other": "User <bold>{0}</bold> had a message retracted by the administrator <bold>{1}</bold> in the group <bold>{2}</bold>: <green>{3}</green>",
10
+ "requester.log.recall.group.self": "User <bold>{0}</bold> retracted a message in the group <bold>{1}</bold>: <green>{2}</green>",
11
+ "requester.log.recall.private": "User <bold>{0}</bold> retracted a message: <green>{1}</green>",
12
+ "requester.log.request.group": "The BOT received a group request from user <bold>{0}</bold>",
13
+ "requester.log.request.private": "The BOT received a friend request from user <bold>{0}</bold>",
14
+ "requester.log.msg.group": "User <bold>{0}</bold> mentioned the BOT in the group <bold>{1}</bold>: <green>{2}</green>",
15
+ "requester.log.msg.private": "User <bold>{0}</bold> sent a message to the BOT: <green>{1}</green>",
16
+ "requester.log.command.group": "User <bold>{0}</bold> exec command <magenta>{1}</magenta> successfully at group <bold>{2}</bold>",
17
+ "requester.log.command.private": "User <bold>{0}</bold> exec command <magenta>{1}</magenta> successfully",
18
+ "requester.log.regexp.group": "User <bold>{0}</bold> match regexp <magenta>{1}</magenta> successfully at group <bold>{2}</bold>",
19
+ "requester.log.regexp.private": "User <bold>{0}</bold> match regexp <magenta>{1}</magenta> successfully",
20
+ "requester.log.http": "HTTP Request to <cyan>{0}</cyan>"
21
+ }
@@ -1,16 +1,16 @@
1
1
  {
2
- "requester.msg.increase": "BOT 进入了群 %group%",
3
- "requester.msg.decrease.leave": "BOT 退出了群 %group%",
4
- "requester.msg.decrease.kick": "BOT 被管理员 %operator% 踢出了群 %group%",
5
- "requester.msg.admin.set": "BOT 被设置为群 %group%",
6
- "requester.msg.admin.unset": "BOT 被取消了群 %group%",
7
- "requester.msg.ban.ban": "BOT 被管理员 %operator% 禁言了 %time% 分钟在群 %group%",
8
- "requester.msg.ban.lift_ban": "BOT 被管理员 %operator% 取消了禁言在群 %group%",
9
- "requester.msg.recall.group.other": "用户 %user% 被管理员 %operator% 在群 %group% 撤回了消息:%message%",
10
- "requester.msg.recall.group.self": "用户 %user% 在群 %group% 撤回了消息:%message%",
11
- "requester.msg.recall.private": "用户 %user% 撤回了消息: %message%",
12
- "requester.msg.request.group": "BOT 收到了来自用户 %user% 的群请求",
13
- "requester.msg.request.private": "BOT 收到了来自用户 %user% 的加好友请求",
14
- "requester.msg.msg.group": "用户 %user% 在群 %group% 艾特了BOT:%message%",
15
- "requester.msg.msg.private": "用户 %user% BOT发来消息:%message%"
16
- }
2
+ "requester.msg.increase": "The BOT has joined the group {0}",
3
+ "requester.msg.decrease.leave": "The BOT has left the group {0}",
4
+ "requester.msg.decrease.kick": "The BOT was kicked out of the group {1} by the administrator {0}",
5
+ "requester.msg.admin.set": "The BOT was set as the admin of the group {0}",
6
+ "requester.msg.admin.unset": "The BOT was removed from the admin position in the group {0}",
7
+ "requester.msg.ban.ban": "The BOT was muted by the administrator {0} for {1} minutes in the group {2}",
8
+ "requester.msg.ban.lift_ban": "The mute on the BOT was lifted by the administrator {0} in the group {1}",
9
+ "requester.msg.recall.group.other": "User {0} had a message retracted by the administrator {1} in the group {2}: {3}",
10
+ "requester.msg.recall.group.self": "User {0} retracted a message in the group {1}: {2}",
11
+ "requester.msg.recall.private": "User {0} retracted a message: {1}",
12
+ "requester.msg.request.group": "The BOT received a group request from user {0} at group {1}",
13
+ "requester.msg.request.private": "The BOT received a friend request from user {0}",
14
+ "requester.msg.msg.group": "User {0} mentioned the BOT in the group {1}: {2}",
15
+ "requester.msg.msg.private": "User {0} sent a message to the BOT: {1}"
16
+ }
@@ -1,16 +1,16 @@
1
1
  {
2
- "requester.msg.increase": "BOT 进入了群 %group%",
3
- "requester.msg.decrease.leave": "BOT 退出了群 %group%",
4
- "requester.msg.decrease.kick": "BOT 被管理员 %operator% 踢出了群 %group%",
5
- "requester.msg.admin.set": "BOT 被设置为群 %group%",
6
- "requester.msg.admin.unset": "BOT 被取消了群 %group%",
7
- "requester.msg.ban.ban": "BOT 被管理员 %operator% 禁言了 %time% 分钟在群 %group%",
8
- "requester.msg.ban.lift_ban": "BOT 被管理员 %operator% 取消了禁言在群 %group%",
9
- "requester.msg.recall.group.other": "用户 %user% 被管理员 %operator% 在群 %group% 撤回了消息:%message%",
10
- "requester.msg.recall.group.self": "用户 %user% 在群 %group% 撤回了消息:%message%",
11
- "requester.msg.recall.private": "用户 %user% 撤回了消息: %message%",
12
- "requester.msg.request.group": "BOT 收到了来自用户 %user% 的群请求",
13
- "requester.msg.request.private": "BOT 收到了来自用户 %user% 的加好友请求",
14
- "requester.msg.msg.group": "用户 %user% 在群 %group% 艾特了BOT:%message%",
15
- "requester.msg.msg.private": "用户 %user% 向BOT发来消息:%message%"
16
- }
2
+ "requester.msg.increase": "BOT 进入了群 {0}",
3
+ "requester.msg.decrease.leave": "BOT 退出了群 {0}",
4
+ "requester.msg.decrease.kick": "BOT 被管理员 {0} 踢出了群 {1}",
5
+ "requester.msg.admin.set": "BOT 被设置为群 {0} 的管理员",
6
+ "requester.msg.admin.unset": "BOT 被取消了群 {0} 的管理员",
7
+ "requester.msg.ban.ban": "BOT 被管理员 {0} 禁言了 {1} 分钟在群 {2}",
8
+ "requester.msg.ban.lift_ban": "BOT 被管理员 {0} 取消了禁言在群 {1}",
9
+ "requester.msg.recall.group.other": "用户 {0} 被管理员 {1} 在群 {2} 撤回了消息:{3}",
10
+ "requester.msg.recall.group.self": "用户 {0} 在群 {1} 撤回了消息:{2}",
11
+ "requester.msg.recall.private": "用户 {0} 撤回了消息:{1}",
12
+ "requester.msg.request.group": "BOT 收到了来自用户 {0} 的群请求在群 {1}",
13
+ "requester.msg.request.private": "BOT 收到了来自用户 {0} 的加好友请求",
14
+ "requester.msg.msg.group": "用户 {0} 在群 {1} 艾特了BOT:{2}",
15
+ "requester.msg.msg.private": "用户 {0} 向BOT发来消息:{1}"
16
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kotori-plugin-requester",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Listen delete message and request event call to master",
5
5
  "main": "lib/index.js",
6
6
  "keywords": [
@@ -17,7 +17,7 @@
17
17
  ],
18
18
  "author": "Himeno <biyuehuya@gmail.com>",
19
19
  "peerDependencies": {
20
- "kotori-bot": "^1.3.2"
20
+ "kotori-bot": "^1.5.0"
21
21
  },
22
22
  "kotori": {
23
23
  "meta": {
@@ -28,8 +28,5 @@
28
28
  "zh_CN"
29
29
  ]
30
30
  }
31
- },
32
- "scripts": {
33
- "build": "tsc --build"
34
31
  }
35
32
  }