@zhin.js/plugin-group-admin 0.0.2 β 0.0.4
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.js +4 -4
- package/lib/index.js.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +4 -4
- package/LICENSE +0 -21
package/lib/index.js
CHANGED
|
@@ -28,12 +28,12 @@ plugin.on('notice.receive', async (notice) => {
|
|
|
28
28
|
const welcomeMsg = `π ${targetName}οΌ${WELCOME_TEMPLATE}`;
|
|
29
29
|
try {
|
|
30
30
|
const adapter = plugin.inject(notice.$adapter);
|
|
31
|
-
if (!adapter)
|
|
31
|
+
if (!adapter?.sendMessage)
|
|
32
32
|
return;
|
|
33
33
|
const bot = adapter.bots?.find((b) => b.$config?.name === notice.$bot || b.$id === notice.$bot);
|
|
34
34
|
if (!bot)
|
|
35
35
|
return;
|
|
36
|
-
await
|
|
36
|
+
await adapter.sendMessage({
|
|
37
37
|
context: notice.$adapter,
|
|
38
38
|
bot: notice.$bot,
|
|
39
39
|
content: welcomeMsg,
|
|
@@ -107,12 +107,12 @@ plugin.on('notice.receive', async (notice) => {
|
|
|
107
107
|
const msg = `β οΈ ${operatorName} ζ€εδΊδΈζ‘ζΆζ―`;
|
|
108
108
|
try {
|
|
109
109
|
const adapter = plugin.inject(notice.$adapter);
|
|
110
|
-
if (!adapter)
|
|
110
|
+
if (!adapter?.sendMessage)
|
|
111
111
|
return;
|
|
112
112
|
const bot = adapter.bots?.find((b) => b.$config?.name === notice.$bot || b.$id === notice.$bot);
|
|
113
113
|
if (!bot)
|
|
114
114
|
return;
|
|
115
|
-
await
|
|
115
|
+
await adapter.sendMessage({
|
|
116
116
|
context: notice.$adapter,
|
|
117
117
|
bot: notice.$bot,
|
|
118
118
|
content: msg,
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAA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
2
|
"name": "@zhin.js/plugin-group-admin",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Group management plugin for Zhin.js β welcome, keyword reply, recall detection",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"license": "MIT",
|
|
37
37
|
"dependencies": {},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"typescript": "^6.0.
|
|
40
|
-
"zhin.js": "1.0.
|
|
39
|
+
"typescript": "^6.0.3",
|
|
40
|
+
"zhin.js": "1.0.72"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"zhin.js": "
|
|
43
|
+
"zhin.js": "1.0.72"
|
|
44
44
|
},
|
|
45
45
|
"repository": {
|
|
46
46
|
"type": "git",
|
package/src/index.ts
CHANGED
|
@@ -32,10 +32,10 @@ plugin.on('notice.receive', async (notice) => {
|
|
|
32
32
|
|
|
33
33
|
try {
|
|
34
34
|
const adapter = plugin.inject(notice.$adapter as any) as any
|
|
35
|
-
if (!adapter) return
|
|
35
|
+
if (!adapter?.sendMessage) return
|
|
36
36
|
const bot = adapter.bots?.find((b: any) => b.$config?.name === notice.$bot || b.$id === notice.$bot)
|
|
37
37
|
if (!bot) return
|
|
38
|
-
await
|
|
38
|
+
await adapter.sendMessage({
|
|
39
39
|
context: notice.$adapter,
|
|
40
40
|
bot: notice.$bot,
|
|
41
41
|
content: welcomeMsg,
|
|
@@ -123,10 +123,10 @@ plugin.on('notice.receive', async (notice) => {
|
|
|
123
123
|
|
|
124
124
|
try {
|
|
125
125
|
const adapter = plugin.inject(notice.$adapter as any) as any
|
|
126
|
-
if (!adapter) return
|
|
126
|
+
if (!adapter?.sendMessage) return
|
|
127
127
|
const bot = adapter.bots?.find((b: any) => b.$config?.name === notice.$bot || b.$id === notice.$bot)
|
|
128
128
|
if (!bot) return
|
|
129
|
-
await
|
|
129
|
+
await adapter.sendMessage({
|
|
130
130
|
context: notice.$adapter,
|
|
131
131
|
bot: notice.$bot,
|
|
132
132
|
content: msg,
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 εθ
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|