@mashroomwolf/koishi-plugin-daynew 1.0.4 → 1.0.6
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 +9 -0
- package/lib/index.js +23 -3
- package/package.json +7 -4
- package/readme.md +6 -3
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Context, Schema } from "koishi";
|
|
2
|
+
export declare const name = "daily-news";
|
|
3
|
+
export declare const inject: {
|
|
4
|
+
required: string[];
|
|
5
|
+
optional: string[];
|
|
6
|
+
};
|
|
7
|
+
export declare const usage = "\n<h1>\u6BCF\u65E5\u65B0\u95FB</h1>\n\n<p>\u76EE\u524D\u4EC5\u6D4B\u8BD5\u4E86 <b>Onebot</b> \u534F\u8BAE</p>\n\n<p>\u4ED3\u5E93\u5730\u5740\uFF1A<a href=\"https://github.com/snowwolfair/daynew\">https://github.com/snowwolfair/daynew</a></p>\n\n<p style=\"color: #f39c12;\">\u63D2\u4EF6\u4F7F\u7528\u95EE\u9898 / Bug\u53CD\u9988 \u8BF7\u53D1 issue</p>\n\n\n<h2>\u98DF\u7528\u65B9\u6CD5</h2>\n\n<p>\u5728 <b>\u53D1\u9001\u4FE1\u606F\u914D\u7F6E</b> \u4E2D <b style=\"color: #08b402ff;\">\u6DFB\u52A0\u9879\u76EE</b>, \u7136\u540E\u8F93\u5165\u673A\u5668\u4EBA\u6240\u5728\u7FA4\u53F7\u5373\u53EF</p>\n<p>\u82E5\u9700\u8981\u53D1\u9001\u5230\u591A\u4E2A\u7FA4\uFF0C\u53EF\u4EE5\u7EE7\u7EED\u6DFB\u52A0\u9879\u76EE</p>\n<hr>\n<p>\u672C\u9879\u76EE\u6CE8\u518C\u4E86\u4E00\u4E2A\u540D\u4E3A <b style=\"color: #f70404ff;\">daily</b> \u7684\u547D\u4EE4\uFF0C\u548C\u5B9A\u65F6\u4EFB\u52A1\u53D1\u51FA\u7684\u4FE1\u606F\u4E00\u6837</p>\n<p>\u82E5\u4E0D\u9700\u8981\u8BE5\u547D\u4EE4\uFF0C\u8BF7\u5728 <b style=\"color: #08b402ff;\">\u6307\u4EE4\u7BA1\u7406</b> \u4E2D\u5173\u95ED</p>\n";
|
|
8
|
+
export declare const Config: Schema;
|
|
9
|
+
export declare function apply(ctx: Context, config: any): void;
|
package/lib/index.js
CHANGED
|
@@ -23,7 +23,8 @@ __export(src_exports, {
|
|
|
23
23
|
Config: () => Config,
|
|
24
24
|
apply: () => apply,
|
|
25
25
|
inject: () => inject,
|
|
26
|
-
name: () => name
|
|
26
|
+
name: () => name,
|
|
27
|
+
usage: () => usage
|
|
27
28
|
});
|
|
28
29
|
module.exports = __toCommonJS(src_exports);
|
|
29
30
|
var import_koishi = require("koishi");
|
|
@@ -32,6 +33,24 @@ var inject = {
|
|
|
32
33
|
required: ["cron", "database"],
|
|
33
34
|
optional: ["adapter-onebot"]
|
|
34
35
|
};
|
|
36
|
+
var usage = `
|
|
37
|
+
<h1>每日新闻</h1>
|
|
38
|
+
|
|
39
|
+
<p>目前仅测试了 <b>Onebot</b> 协议</p>
|
|
40
|
+
|
|
41
|
+
<p>仓库地址:<a href="https://github.com/snowwolfair/daynew">https://github.com/snowwolfair/daynew</a></p>
|
|
42
|
+
|
|
43
|
+
<p style="color: #f39c12;">插件使用问题 / Bug反馈 请发 issue</p>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<h2>食用方法</h2>
|
|
47
|
+
|
|
48
|
+
<p>在 <b>发送信息配置</b> 中 <b style="color: #08b402ff;">添加项目</b>, 然后输入机器人所在群号即可</p>
|
|
49
|
+
<p>若需要发送到多个群,可以继续添加项目</p>
|
|
50
|
+
<hr>
|
|
51
|
+
<p>本项目注册了一个名为 <b style="color: #f70404ff;">daily</b> 的命令,和定时任务发出的信息一样</p>
|
|
52
|
+
<p>若不需要该命令,请在 <b style="color: #08b402ff;">指令管理</b> 中关闭</p>
|
|
53
|
+
`;
|
|
35
54
|
var Config = import_koishi.Schema.intersect([
|
|
36
55
|
import_koishi.Schema.object({
|
|
37
56
|
daynews: import_koishi.Schema.boolean().default(true).description("是否发送每日新闻"),
|
|
@@ -49,7 +68,7 @@ var Config = import_koishi.Schema.intersect([
|
|
|
49
68
|
import_koishi.Schema.object({
|
|
50
69
|
Objective: import_koishi.Schema.array(
|
|
51
70
|
import_koishi.Schema.object({
|
|
52
|
-
platform: import_koishi.Schema.union(["onebot"]).default("onebot").description("目标平台
|
|
71
|
+
platform: import_koishi.Schema.union(["onebot", "qq", "discord", "telegram", "kook"]).default("onebot").description("目标平台"),
|
|
53
72
|
group: import_koishi.Schema.array(
|
|
54
73
|
import_koishi.Schema.string().default("").description("目标群组")
|
|
55
74
|
).default([])
|
|
@@ -120,5 +139,6 @@ __name(sendNews, "sendNews");
|
|
|
120
139
|
Config,
|
|
121
140
|
apply,
|
|
122
141
|
inject,
|
|
123
|
-
name
|
|
142
|
+
name,
|
|
143
|
+
usage
|
|
124
144
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mashroomwolf/koishi-plugin-daynew",
|
|
3
|
-
"description": "",
|
|
4
|
-
"version": "1.0.
|
|
3
|
+
"description": "Daily 60s News Plugin",
|
|
4
|
+
"version": "1.0.6",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -10,11 +10,15 @@
|
|
|
10
10
|
],
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"homepage": "https://github.com/snowwolfair/daynew",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/snowwolfair/daynew/issues"
|
|
15
|
+
},
|
|
13
16
|
"scripts": {},
|
|
14
17
|
"keywords": [
|
|
15
18
|
"chatbot",
|
|
16
19
|
"koishi",
|
|
17
|
-
"plugin"
|
|
20
|
+
"plugin",
|
|
21
|
+
"dailynews"
|
|
18
22
|
],
|
|
19
23
|
"peerDependencies": {
|
|
20
24
|
"koishi": "^4.18.7"
|
|
@@ -37,7 +41,6 @@
|
|
|
37
41
|
"adapter-onebot"
|
|
38
42
|
]
|
|
39
43
|
},
|
|
40
|
-
"preview": true,
|
|
41
44
|
"browser": true
|
|
42
45
|
}
|
|
43
46
|
}
|
package/readme.md
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
# @mashroomwolf/koishi-plugin-
|
|
1
|
+
# @mashroomwolf/koishi-plugin-daynew
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@mashroomwolf/koishi-plugin-daynew)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
一个暂时仅测试了 QQ onebot 机器人的每日新闻插件
|
|
6
6
|
|
|
7
7
|
# 食用方法
|
|
8
8
|
|
|
9
9
|
在发送信息配置中`添加项目`, 然后输入机器人所在群号即可
|
|
10
10
|
|
|
11
|
+
本项目注册了一个名为 `daily` 的命令,和定时任务发出的信息一样
|
|
12
|
+
若不需要该命令,请在`指令管理`中关闭
|
|
13
|
+
|
|
11
14
|
# 注意事项
|
|
12
15
|
|
|
13
16
|
- 必须服务:cron 会标橙色是正常现象, 显示`koishi-plugin-cron (已加载)`时即可使用
|
|
14
17
|
- 插件默认每天早上 9 点发送新闻
|
|
15
|
-
-
|
|
18
|
+
- 目前仅测试了 QQ onebot 机器人可用
|
|
16
19
|
- 如果新闻源未读取,请自行添加其他新闻源
|