koishi-plugin-rina-birthday 0.0.1

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/data.d.ts ADDED
@@ -0,0 +1,24 @@
1
+ export declare const lovelive_character_birthdays: {
2
+ month: number;
3
+ date: number;
4
+ name: string;
5
+ group: string;
6
+ }[];
7
+ export declare const lovelive_voice_actor_birthdays: {
8
+ month: number;
9
+ date: number;
10
+ name: string;
11
+ group: string;
12
+ }[];
13
+ export declare const bangdream_character_birthdays: {
14
+ month: number;
15
+ date: number;
16
+ name: string;
17
+ group: string;
18
+ }[];
19
+ export declare const bangdream_voice_actor_birthdays: {
20
+ month: number;
21
+ date: number;
22
+ name: string;
23
+ group: string;
24
+ }[];
package/lib/index.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ import { Context, Schema } from 'koishi';
2
+ import 'koishi-plugin-cron';
3
+ export declare const name = "rina-birthday";
4
+ export declare const inject: string[];
5
+ export interface BroadcastTarget {
6
+ onebotSelfId: string;
7
+ groupId: string;
8
+ enableLoveLive: boolean;
9
+ enableBangDream: boolean;
10
+ enableFriendBirthdays: boolean;
11
+ }
12
+ export interface Config {
13
+ targets: BroadcastTarget[];
14
+ }
15
+ export declare const Config: Schema<Config>;
16
+ export declare function apply(ctx: Context, config: Config): void;
package/lib/index.js ADDED
@@ -0,0 +1,486 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
+ var __export = (target, all) => {
7
+ for (var name2 in all)
8
+ __defProp(target, name2, { get: all[name2], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ Config: () => Config,
24
+ apply: () => apply,
25
+ inject: () => inject,
26
+ name: () => name
27
+ });
28
+ module.exports = __toCommonJS(src_exports);
29
+ var import_koishi = require("koishi");
30
+ var import_koishi_plugin_cron = require("koishi-plugin-cron");
31
+
32
+ // src/data.ts
33
+ var lovelive_character_birthdays = [
34
+ { month: 1, date: 1, name: "黑泽黛雅", group: "Aqours" },
35
+ { month: 1, date: 13, name: "村野沙耶香", group: "莲之空女学院学园偶像俱乐部" },
36
+ { month: 1, date: 17, name: "小泉花阳", group: "μ's" },
37
+ { month: 1, date: 20, name: "薇恩·玛格丽特", group: "Liella!" },
38
+ { month: 1, date: 23, name: "中须霞", group: "虹咲学园学园偶像同好会" },
39
+ { month: 2, date: 5, name: "艾玛·维尔德", group: "虹咲学园学园偶像同好会" },
40
+ { month: 2, date: 10, name: "松浦果南", group: "Aqours" },
41
+ { month: 2, date: 13, name: "麻布麻衣", group: "人生不易部!" },
42
+ { month: 2, date: 15, name: "钟岚珠", group: "虹咲学园学园偶像同好会" },
43
+ { month: 2, date: 25, name: "岚千砂都", group: "Liella!" },
44
+ { month: 2, date: 28, name: "徒町小铃", group: "莲之空女学院学园偶像俱乐部" },
45
+ { month: 3, date: 1, name: "上原步梦", group: "虹咲学园学园偶像同好会" },
46
+ { month: 3, date: 2, name: "金泽奇迹", group: "人生不易部!" },
47
+ { month: 3, date: 4, name: "国木田花丸", group: "Aqours" },
48
+ { month: 3, date: 15, name: "园田海未", group: "μ's" },
49
+ { month: 4, date: 3, name: "樱坂雫", group: "虹咲学园学园偶像同好会" },
50
+ { month: 4, date: 4, name: "调布乃理子", group: "人生不易部!" },
51
+ { month: 4, date: 10, name: "樱小路希奈子", group: "Liella!" },
52
+ { month: 4, date: 17, name: "渡边曜", group: "Aqours" },
53
+ { month: 4, date: 19, name: "西木野真姬", group: "μ's" },
54
+ { month: 5, date: 1, name: "涩谷香音", group: "Liella!" },
55
+ { month: 5, date: 4, name: "鹿角圣良", group: "Saint Snow" },
56
+ { month: 5, date: 7, name: "山田真绿", group: "人生不易部!" },
57
+ { month: 5, date: 22, name: "日野下花帆", group: "莲之空女学院学园偶像俱乐部" },
58
+ { month: 5, date: 30, name: "宫下爱", group: "虹咲学园学园偶像同好会" },
59
+ { month: 6, date: 9, name: "东条希", group: "μ's" },
60
+ { month: 6, date: 11, name: "驹形花火", group: "人生不易部!" },
61
+ { month: 6, date: 13, name: "小原鞠莉", group: "Aqours" },
62
+ { month: 6, date: 15, name: "乙宗梢", group: "莲之空女学院学园偶像俱乐部" },
63
+ { month: 6, date: 17, name: "若菜四季", group: "Liella!" },
64
+ { month: 6, date: 26, name: "塞拉斯·柳田·利林菲尔德", group: "莲之空女学院学园偶像俱乐部" },
65
+ { month: 6, date: 29, name: "朝香果林", group: "虹咲学园学园偶像同好会" },
66
+ { month: 7, date: 9, name: "五桐玲", group: "人生不易部!" },
67
+ { month: 7, date: 13, name: "津岛善子", group: "Aqours" },
68
+ { month: 7, date: 17, name: "唐可可", group: "Liella!" },
69
+ { month: 7, date: 22, name: "矢泽妮可", group: "μ's" },
70
+ { month: 8, date: 1, name: "高海千歌", group: "Aqours" },
71
+ { month: 8, date: 3, name: "高坂穗乃果", group: "μ's" },
72
+ { month: 8, date: 7, name: "鬼塚夏美", group: "Liella!" },
73
+ { month: 8, date: 8, name: "优木雪菜", group: "虹咲学园学园偶像同好会" },
74
+ { month: 8, date: 11, name: "圣泽悠奈", group: "Sunny Passion" },
75
+ { month: 8, date: 18, name: "高桥波尔卡", group: "人生不易部!" },
76
+ { month: 8, date: 31, name: "大泽瑠璃乃", group: "莲之空女学院学园偶像俱乐部" },
77
+ { month: 9, date: 12, name: "南小鸟", group: "μ's" },
78
+ { month: 9, date: 19, name: "樱内梨子", group: "Aqours" },
79
+ { month: 9, date: 21, name: "黑泽露比", group: "Aqours" },
80
+ { month: 9, date: 22, name: "春宫悠可里", group: "人生不易部!" },
81
+ { month: 9, date: 24, name: "安养寺姬芽", group: "莲之空女学院学园偶像俱乐部" },
82
+ { month: 9, date: 28, name: "平安名堇", group: "Liella!" },
83
+ { month: 10, date: 5, name: "三船栞子", group: "虹咲学园学园偶像同好会" },
84
+ { month: 10, date: 20, name: "百生吟子", group: "莲之空女学院学园偶像俱乐部" },
85
+ { month: 10, date: 21, name: "绚濑绘里", group: "μ's" },
86
+ { month: 10, date: 29, name: "米女芽衣", group: "Liella!" },
87
+ { month: 11, date: 1, name: "星空凛", group: "μ's" },
88
+ { month: 11, date: 11, name: "佐佐木翔音", group: "人生不易部!" },
89
+ { month: 11, date: 13, name: "天王寺璃奈", group: "虹咲学园学园偶像同好会" },
90
+ { month: 11, date: 17, name: "夕雾缀理", group: "莲之空女学院学园偶像俱乐部" },
91
+ { month: 11, date: 24, name: "叶月恋", group: "Liella!" },
92
+ { month: 12, date: 1, name: "桂城泉", group: "莲之空女学院学园偶像俱乐部" },
93
+ { month: 12, date: 2, name: "柊摩央", group: "Sunny Passion" },
94
+ { month: 12, date: 6, name: "米娅·泰勒", group: "虹咲学园学园偶像同好会" },
95
+ { month: 12, date: 12, name: "鹿角理亚", group: "Saint Snow" },
96
+ { month: 12, date: 16, name: "近江彼方", group: "虹咲学园学园偶像同好会" },
97
+ { month: 12, date: 20, name: "藤岛慈", group: "莲之空女学院学园偶像俱乐部" },
98
+ { month: 12, date: 28, name: "鬼塚冬毬", group: "Liella!" }
99
+ ];
100
+ var lovelive_voice_actor_birthdays = [
101
+ { month: 1, date: 9, name: "Liyuu", group: "Liella!" },
102
+ { month: 1, date: 19, name: "天泽朱音", group: "人生不易部!" },
103
+ { month: 1, date: 23, name: "小户森穗花", group: "人生不易部!" },
104
+ { month: 1, date: 28, name: "野中心菜", group: "莲之空女学院学园偶像俱乐部" },
105
+ { month: 1, date: 28, name: "叶山风花", group: "莲之空女学院学园偶像俱乐部" },
106
+ { month: 1, date: 31, name: "久保田未梦", group: "虹咲学园学园偶像同好会" },
107
+ { month: 2, date: 1, name: "楠田亚衣奈", group: "μ's" },
108
+ { month: 2, date: 5, name: "小宫有纱", group: "Aqours" },
109
+ { month: 2, date: 7, name: "伊波杏树", group: "Aqours" },
110
+ { month: 2, date: 12, name: "田野麻美", group: "Saint Snow" },
111
+ { month: 2, date: 19, name: "降幡爱", group: "Aqours" },
112
+ { month: 2, date: 23, name: "绘森彩", group: "Liella!" },
113
+ { month: 2, date: 27, name: "小泉萌香", group: "虹咲学园学园偶像同好会" },
114
+ { month: 3, date: 5, name: "矢野妃菜喜", group: "虹咲学园学园偶像同好会" },
115
+ { month: 3, date: 8, name: "岬奈子", group: "Liella!" },
116
+ { month: 3, date: 28, name: "吉武千飒", group: "Sunny Passion" },
117
+ { month: 3, date: 31, name: "藤野心", group: "人生不易部!" },
118
+ { month: 4, date: 3, name: "坂仓花", group: "Liella!" },
119
+ { month: 4, date: 13, name: "大熊和奏", group: "Liella!" },
120
+ { month: 4, date: 17, name: "相良茉优", group: "虹咲学园学园偶像同好会" },
121
+ { month: 4, date: 20, name: "进藤天音", group: "莲之空女学院学园偶像俱乐部" },
122
+ { month: 4, date: 25, name: "前田佳织里", group: "虹咲学园学园偶像同好会" },
123
+ { month: 5, date: 2, name: "Pile", group: "μ's" },
124
+ { month: 5, date: 2, name: "大西亚玖璃", group: "虹咲学园学园偶像同好会" },
125
+ { month: 5, date: 15, name: "林鼓子", group: "虹咲学园学园偶像同好会" },
126
+ { month: 5, date: 16, name: "青山渚", group: "Liella!" },
127
+ { month: 5, date: 19, name: "久保百合花", group: "μ's" },
128
+ { month: 5, date: 21, name: "榆井希实", group: "莲之空女学院学园偶像俱乐部" },
129
+ { month: 5, date: 24, name: "内田秀", group: "虹咲学园学园偶像同好会" },
130
+ { month: 5, date: 31, name: "坂野爱羽", group: "人生不易部!" },
131
+ { month: 6, date: 9, name: "结木由奈", group: "Sunny Passion" },
132
+ { month: 6, date: 18, name: "凉之濑葵音", group: "人生不易部!" },
133
+ { month: 6, date: 28, name: "三森铃子", group: "μ's" },
134
+ { month: 7, date: 1, name: "佩顿尚未", group: "Liella!" },
135
+ { month: 7, date: 12, name: "南条爱乃", group: "μ's" },
136
+ { month: 7, date: 18, name: "薮岛朱音", group: "Liella!" },
137
+ { month: 7, date: 23, name: "内田彩", group: "μ's" },
138
+ { month: 7, date: 23, name: "铃木爱奈", group: "Aqours" },
139
+ { month: 8, date: 5, name: "法元明菜", group: "虹咲学园学园偶像同好会" },
140
+ { month: 8, date: 8, name: "逢田梨香子", group: "Aqours" },
141
+ { month: 8, date: 16, name: "齐藤朱夏", group: "Aqours" },
142
+ { month: 8, date: 20, name: "月音粉", group: "莲之空女学院学园偶像俱乐部" },
143
+ { month: 8, date: 28, name: "佐佐木琴子", group: "莲之空女学院学园偶像俱乐部" },
144
+ { month: 9, date: 7, name: "村上奈津实", group: "虹咲学园学园偶像同好会" },
145
+ { month: 9, date: 17, name: "樱井阳菜", group: "莲之空女学院学园偶像俱乐部" },
146
+ { month: 9, date: 19, name: "濑古梨爱", group: "人生不易部!" },
147
+ { month: 9, date: 20, name: "指出毬亚", group: "虹咲学园学园偶像同好会" },
148
+ { month: 9, date: 25, name: "高槻加奈子", group: "Aqours" },
149
+ { month: 9, date: 27, name: "结那", group: "Liella!" },
150
+ { month: 9, date: 30, name: "伊达小百合", group: "Liella!" },
151
+ { month: 10, date: 4, name: "远藤璃菜", group: "人生不易部!" },
152
+ { month: 10, date: 6, name: "田中千惠美", group: "虹咲学园学园偶像同好会" },
153
+ { month: 10, date: 13, name: "奥村优季", group: "人生不易部!" },
154
+ { month: 10, date: 16, name: "鬼头明里", group: "虹咲学园学园偶像同好会" },
155
+ { month: 10, date: 23, name: "小林爱香", group: "Aqours" },
156
+ { month: 10, date: 24, name: "花宫初奈", group: "莲之空女学院学园偶像俱乐部" },
157
+ { month: 10, date: 26, name: "饭田里穗", group: "μ's" },
158
+ { month: 11, date: 1, name: "铃原希实", group: "Liella!" },
159
+ { month: 11, date: 2, name: "诹访奈奈香", group: "Aqours" },
160
+ { month: 11, date: 8, name: "来栖凛", group: "莲之空女学院学园偶像俱乐部" },
161
+ { month: 11, date: 19, name: "菅叶和", group: "莲之空女学院学园偶像俱乐部" },
162
+ { month: 12, date: 10, name: "新田惠海", group: "μ's" },
163
+ { month: 12, date: 14, name: "三宅美羽", group: "莲之空女学院学园偶像俱乐部" },
164
+ { month: 12, date: 22, name: "楠木灯", group: "虹咲学园学园偶像同好会" },
165
+ { month: 12, date: 23, name: "佐藤日向", group: "Saint Snow" },
166
+ { month: 12, date: 26, name: "德井青空", group: "μ's" },
167
+ { month: 12, date: 31, name: "绫咲穗音", group: "人生不易部!" }
168
+ ];
169
+ var bangdream_character_birthdays = [
170
+ { month: 1, date: 7, name: "羽泽鸫", group: "Afterglow" },
171
+ { month: 1, date: 13, name: "和奏瑞依(LAYER)", group: "RAISE A SUILEN" },
172
+ { month: 1, date: 14, name: "若叶睦", group: "Ave Mujica" },
173
+ { month: 2, date: 7, name: "峰月律", group: "梦限大 MewType" },
174
+ { month: 2, date: 14, name: "丰川祥子", group: "Ave Mujica" },
175
+ { month: 2, date: 19, name: "仓田真白", group: "Morfonica" },
176
+ { month: 2, date: 22, name: "要乐奈", group: "MyGO!!!!!" },
177
+ { month: 2, date: 28, name: "濑田薰", group: "Hello, Happy World!" },
178
+ { month: 3, date: 5, name: "四宫宁月", group: "一家 Dumb Rock!" },
179
+ { month: 3, date: 12, name: "汐见萤", group: "millsage" },
180
+ { month: 3, date: 20, name: "冰川日菜", group: "Pastel*Palettes" },
181
+ { month: 3, date: 20, name: "冰川纱夜", group: "Roselia" },
182
+ { month: 3, date: 23, name: "牛込里美", group: "Poppin'Party" },
183
+ { month: 3, date: 25, name: "鳰原令王那(PAREO)", group: "RAISE A SUILEN" },
184
+ { month: 3, date: 30, name: "伊泽枣", group: "millsage" },
185
+ { month: 4, date: 2, name: "梅里千樱梨", group: "一家 Dumb Rock!" },
186
+ { month: 4, date: 6, name: "白鹭千圣", group: "Pastel*Palettes" },
187
+ { month: 4, date: 7, name: "八幡海铃", group: "Ave Mujica" },
188
+ { month: 4, date: 10, name: "美竹兰", group: "Afterglow" },
189
+ { month: 4, date: 15, name: "宇田川巴", group: "Afterglow" },
190
+ { month: 4, date: 17, name: "宫永野乃花", group: "梦限大 MewType" },
191
+ { month: 5, date: 6, name: "矢仓蓬咲", group: "一家 Dumb Rock!" },
192
+ { month: 5, date: 11, name: "松原花音", group: "Hello, Happy World!" },
193
+ { month: 5, date: 12, name: "佐藤益木(MASKING)", group: "RAISE A SUILEN" },
194
+ { month: 5, date: 19, name: "山吹沙绫", group: "Poppin'Party" },
195
+ { month: 5, date: 27, name: "长崎素世", group: "MyGO!!!!!" },
196
+ { month: 6, date: 1, name: "祐天寺若麦", group: "Ave Mujica" },
197
+ { month: 6, date: 16, name: "广町七深", group: "Morfonica" },
198
+ { month: 6, date: 26, name: "三角初华", group: "Ave Mujica" },
199
+ { month: 6, date: 27, name: "若宫伊芙", group: "Pastel*Palettes" },
200
+ { month: 7, date: 3, name: "宇田川亚子", group: "Roselia" },
201
+ { month: 7, date: 14, name: "户山香澄", group: "Poppin'Party" },
202
+ { month: 7, date: 16, name: "滨崎茉幌", group: "millsage" },
203
+ { month: 7, date: 17, name: "朝日六花(LOCK)", group: "RAISE A SUILEN" },
204
+ { month: 7, date: 28, name: "须贺蕾叶", group: "一家 Dumb Rock!" },
205
+ { month: 7, date: 30, name: "北泽育美", group: "Hello, Happy World!" },
206
+ { month: 8, date: 8, name: "弦卷心", group: "Hello, Happy World!" },
207
+ { month: 8, date: 9, name: "椎名立希", group: "MyGO!!!!!" },
208
+ { month: 8, date: 16, name: "仲町阿拉蕾", group: "梦限大 MewType" },
209
+ { month: 8, date: 25, name: "今井莉莎", group: "Roselia" },
210
+ { month: 9, date: 3, name: "青叶摩卡", group: "Afterglow" },
211
+ { month: 9, date: 8, name: "千早爱音", group: "MyGO!!!!!" },
212
+ { month: 9, date: 15, name: "二叶筑紫", group: "Morfonica" },
213
+ { month: 9, date: 19, name: "藤都子", group: "梦限大 MewType" },
214
+ { month: 10, date: 1, name: "奥泽美咲", group: "Hello, Happy World!" },
215
+ { month: 10, date: 4, name: "马桥心玖", group: "一家 Dumb Rock!" },
216
+ { month: 10, date: 17, name: "白金燐子", group: "Roselia" },
217
+ { month: 10, date: 23, name: "上原绯玛丽", group: "Afterglow" },
218
+ { month: 10, date: 24, name: "和泉朋花", group: "millsage" },
219
+ { month: 10, date: 26, name: "凑友希那", group: "Roselia" },
220
+ { month: 10, date: 27, name: "市谷有咲", group: "Poppin'Party" },
221
+ { month: 11, date: 3, name: "大和麻弥", group: "Pastel*Palettes" },
222
+ { month: 11, date: 4, name: "千石由乃", group: "梦限大 MewType" },
223
+ { month: 11, date: 19, name: "八潮瑠唯", group: "Morfonica" },
224
+ { month: 11, date: 22, name: "高松灯", group: "MyGO!!!!!" },
225
+ { month: 12, date: 4, name: "花园多惠", group: "Poppin'Party" },
226
+ { month: 12, date: 7, name: "珠手知由(CHU²)", group: "RAISE A SUILEN" },
227
+ { month: 12, date: 10, name: "琴平凪", group: "millsage" },
228
+ { month: 12, date: 16, name: "桐谷透子", group: "Morfonica" },
229
+ { month: 12, date: 27, name: "丸山彩", group: "Pastel*Palettes" }
230
+ ];
231
+ var bangdream_voice_actor_birthdays = [
232
+ { month: 1, date: 5, name: "青木阳菜", group: "MyGO!!!!!" },
233
+ { month: 1, date: 13, name: "三泽纱千香", group: "Afterglow" },
234
+ { month: 1, date: 13, name: "Raychell", group: "RAISE A SUILEN" },
235
+ { month: 1, date: 22, name: "咲川日菜乃", group: "millsage" },
236
+ { month: 1, date: 29, name: "佐仓绫音", group: "Afterglow" },
237
+ { month: 2, date: 3, name: "小原莉子", group: "RAISE A SUILEN" },
238
+ { month: 2, date: 8, name: "志崎桦音", group: "Roselia" },
239
+ { month: 2, date: 15, name: "结川朝希", group: "millsage" },
240
+ { month: 2, date: 18, name: "渡濑结月", group: "Ave Mujica" },
241
+ { month: 2, date: 24, name: "伊驹由理惠", group: "millsage" },
242
+ { month: 3, date: 5, name: "凉泉樱花", group: "一家 Dumb Rock!" },
243
+ { month: 3, date: 5, name: "远野光", group: "一家 Dumb Rock!" },
244
+ { month: 3, date: 14, name: "小日向美香", group: "MyGO!!!!!" },
245
+ { month: 3, date: 15, name: "丰田萌绘", group: "Hello, Happy World!" },
246
+ { month: 3, date: 16, name: "工藤晴香", group: "Roselia" },
247
+ { month: 3, date: 26, name: "羊宫妃那", group: "MyGO!!!!!" },
248
+ { month: 3, date: 31, name: "西尾夕香", group: "Morfonica" },
249
+ { month: 4, date: 10, name: "千春", group: "millsage" },
250
+ { month: 4, date: 10, name: "黑泽朋世", group: "Hello, Happy World!" },
251
+ { month: 4, date: 17, name: "直田姬奈", group: "Morfonica" },
252
+ { month: 4, date: 20, name: "进藤天音", group: "Morfonica" },
253
+ { month: 5, date: 15, name: "林鼓子", group: "MyGO!!!!!" },
254
+ { month: 5, date: 19, name: "冈田梦以", group: "Ave Mujica" },
255
+ { month: 5, date: 19, name: "菱川花菜", group: "一家 Dumb Rock!" },
256
+ { month: 5, date: 22, name: "仓知玲凤", group: "RAISE A SUILEN" },
257
+ { month: 6, date: 18, name: "中上育实", group: "Pastel*Palettes" },
258
+ { month: 6, date: 24, name: "mika", group: "Morfonica" },
259
+ { month: 7, date: 5, name: "纺木吏佐", group: "RAISE A SUILEN" },
260
+ { month: 7, date: 10, name: "立石凛", group: "MyGO!!!!!" },
261
+ { month: 7, date: 16, name: "日笠阳子", group: "Afterglow" },
262
+ { month: 7, date: 20, name: "夏芽", group: "RAISE A SUILEN" },
263
+ { month: 8, date: 10, name: "小泽亚李", group: "Pastel*Palettes" },
264
+ { month: 8, date: 17, name: "伊藤彩沙", group: "Poppin'Party" },
265
+ { month: 8, date: 18, name: "吉田有里", group: "Hello, Happy World!" },
266
+ { month: 9, date: 10, name: "高尾奏音", group: "Ave Mujica" },
267
+ { month: 9, date: 11, name: "药师寺李有", group: "millsage" },
268
+ { month: 9, date: 12, name: "中岛由贵", group: "Roselia" },
269
+ { month: 9, date: 13, name: "大桥彩香", group: "Poppin'Party" },
270
+ { month: 9, date: 14, name: "秦佐和子", group: "Pastel*Palettes" },
271
+ { month: 10, date: 10, name: "大冢纱英", group: "Poppin'Party" },
272
+ { month: 10, date: 12, name: "伊藤美来", group: "Hello, Happy World!" },
273
+ { month: 10, date: 17, name: "相羽爱奈", group: "Roselia" },
274
+ { month: 10, date: 19, name: "Ayasa", group: "Morfonica" },
275
+ { month: 10, date: 24, name: "樱川惠", group: "Roselia" },
276
+ { month: 10, date: 24, name: "花宫初奈", group: "一家 Dumb Rock!" },
277
+ { month: 10, date: 25, name: "西本里美", group: "Poppin'Party" },
278
+ { month: 11, date: 10, name: "田所梓", group: "Hello, Happy World!" },
279
+ { month: 11, date: 10, name: "佐佐木李子", group: "Ave Mujica" },
280
+ { month: 11, date: 19, name: "橘芽衣", group: "一家 Dumb Rock!" },
281
+ { month: 11, date: 22, name: "前岛亚美", group: "Pastel*Palettes" },
282
+ { month: 11, date: 26, name: "加藤英美里", group: "Afterglow" },
283
+ { month: 12, date: 16, name: "金元寿子", group: "Afterglow" },
284
+ { month: 12, date: 19, name: "上坂堇", group: "Pastel*Palettes" },
285
+ { month: 12, date: 25, name: "爱美", group: "Poppin'Party" },
286
+ { month: 12, date: 31, name: "米泽茜", group: "Ave Mujica" }
287
+ ];
288
+
289
+ // src/model.ts
290
+ function extendModel(ctx) {
291
+ ctx.model.extend("rina_birthday_friend", {
292
+ id: "string",
293
+ nickname: "string",
294
+ date: "string",
295
+ groups: "string"
296
+ }, {
297
+ primary: "id"
298
+ });
299
+ }
300
+ __name(extendModel, "extendModel");
301
+
302
+ // src/index.ts
303
+ var name = "rina-birthday";
304
+ var inject = ["cron", "database"];
305
+ var BroadcastTargetSchema = import_koishi.Schema.object({
306
+ onebotSelfId: import_koishi.Schema.string().required().description("用于向此群发送播报的 OneBot 账号。"),
307
+ groupId: import_koishi.Schema.string().required().description("接收播报的 OneBot 群号。"),
308
+ enableLoveLive: import_koishi.Schema.boolean().description("在此群播报 Love Live! 系列生日。").default(true),
309
+ enableBangDream: import_koishi.Schema.boolean().description("在此群播报 BanG Dream! 企划生日。").default(true),
310
+ enableFriendBirthdays: import_koishi.Schema.boolean().description("在此群读取数据库并播报群友生日。").default(false)
311
+ });
312
+ var Config = import_koishi.Schema.object({
313
+ targets: import_koishi.Schema.array(BroadcastTargetSchema).description("按群独立设置播报内容。").default([])
314
+ });
315
+ function getDateInTimeZone(date, timeZone) {
316
+ const parts = new Intl.DateTimeFormat("en-CA", {
317
+ timeZone,
318
+ year: "numeric",
319
+ month: "2-digit",
320
+ day: "2-digit"
321
+ }).formatToParts(date);
322
+ const values = Object.fromEntries(parts.map((part) => [part.type, part.value]));
323
+ return {
324
+ year: Number(values.year),
325
+ month: Number(values.month),
326
+ date: Number(values.day)
327
+ };
328
+ }
329
+ __name(getDateInTimeZone, "getDateInTimeZone");
330
+ function formatDate(date) {
331
+ return `${date.year} 年 ${date.month} 月 ${date.date} 日`;
332
+ }
333
+ __name(formatDate, "formatDate");
334
+ function formatBirthdays(title, characters, voiceActors, date) {
335
+ const characterNames = characters.filter((entry) => entry.month === date.month && entry.date === date.date).map((entry) => `${entry.name}(${entry.group})`);
336
+ const voiceActorNames = voiceActors.filter((entry) => entry.month === date.month && entry.date === date.date).map((entry) => `${entry.name}(${entry.group})`);
337
+ if (!characterNames.length && !voiceActorNames.length) return;
338
+ const lines = [`${title}:`];
339
+ if (characterNames.length) lines.push(`角色:${characterNames.join("、")}`);
340
+ if (voiceActorNames.length) lines.push(`声优:${voiceActorNames.join("、")}`);
341
+ return lines.join("\n");
342
+ }
343
+ __name(formatBirthdays, "formatBirthdays");
344
+ function countBirthdays(entries, date) {
345
+ return entries.filter((entry) => entry.month === date.month && entry.date === date.date).length;
346
+ }
347
+ __name(countBirthdays, "countBirthdays");
348
+ function createBroadcast(target, now, friends) {
349
+ const beijingDate = getDateInTimeZone(now, "Asia/Shanghai");
350
+ const tokyoDate = getDateInTimeZone(now, "Asia/Tokyo");
351
+ const sections = [];
352
+ let projectBirthdayCount = 0;
353
+ if (target.enableLoveLive) {
354
+ const section = formatBirthdays("Love Live!", lovelive_character_birthdays, lovelive_voice_actor_birthdays, tokyoDate);
355
+ if (section) sections.push(section);
356
+ projectBirthdayCount += countBirthdays(lovelive_character_birthdays, tokyoDate);
357
+ projectBirthdayCount += countBirthdays(lovelive_voice_actor_birthdays, tokyoDate);
358
+ }
359
+ if (target.enableBangDream) {
360
+ const section = formatBirthdays("BanG Dream!", bangdream_character_birthdays, bangdream_voice_actor_birthdays, tokyoDate);
361
+ if (section) sections.push(section);
362
+ projectBirthdayCount += countBirthdays(bangdream_character_birthdays, tokyoDate);
363
+ projectBirthdayCount += countBirthdays(bangdream_voice_actor_birthdays, tokyoDate);
364
+ }
365
+ if (!sections.length && !friends.length) return;
366
+ const projectPronoun = projectBirthdayCount === 1 ? "她" : "她们";
367
+ const content = [
368
+ `现在是东京时间:${formatDate(tokyoDate)} 00:00,新的一天开始了[≧▽≦]`,
369
+ ...projectBirthdayCount ? [
370
+ `🎂 今天是${projectPronoun}的生日,祝${projectPronoun}生日快乐[≧▽≦]`,
371
+ "",
372
+ ...sections
373
+ ] : []
374
+ ].join("\n");
375
+ if (!friends.length) return content;
376
+ const friendSubject = friends.length === 1 ? "这位饱饱" : "这些饱饱";
377
+ const friendPronoun = friends.length === 1 ? "饱饱" : "饱饱们";
378
+ return [
379
+ content,
380
+ `
381
+
382
+ 今天是${friendSubject}的生日,祝${friendPronoun}生日快乐[≧▽≦]`,
383
+ ...friends.flatMap((friend, index) => [
384
+ index ? "、" : "",
385
+ (0, import_koishi.h)("at", { id: friend.id })
386
+ ])
387
+ ];
388
+ }
389
+ __name(createBroadcast, "createBroadcast");
390
+ function formatBirthday(date) {
391
+ return `${String(date.month).padStart(2, "0")}-${String(date.date).padStart(2, "0")}`;
392
+ }
393
+ __name(formatBirthday, "formatBirthday");
394
+ function appliesToGroup(groups, groupId) {
395
+ return groups.split(",").some((id) => id.trim() === groupId);
396
+ }
397
+ __name(appliesToGroup, "appliesToGroup");
398
+ function formatMonthlyBirthdays(title, characters, voiceActors, month) {
399
+ const entries = [
400
+ ...characters.filter((entry) => entry.month === month).map((entry) => ({ ...entry, label: "角色" })),
401
+ ...voiceActors.filter((entry) => entry.month === month).map((entry) => ({ ...entry, label: "声优" }))
402
+ ].sort((left, right) => left.date - right.date);
403
+ if (!entries.length) return;
404
+ const lines = /* @__PURE__ */ new Map();
405
+ for (const entry of entries) {
406
+ const names = lines.get(entry.date) ?? [];
407
+ names.push(`${entry.label}:${entry.name}(${entry.group})`);
408
+ lines.set(entry.date, names);
409
+ }
410
+ return [
411
+ `${title}:`,
412
+ ...[...lines].map(([date, names]) => `${String(month).padStart(2, "0")}-${String(date).padStart(2, "0")} ${names.join("、")}`)
413
+ ].join("\n");
414
+ }
415
+ __name(formatMonthlyBirthdays, "formatMonthlyBirthdays");
416
+ function createMonthlyQuery(target, month, friends) {
417
+ const sections = [];
418
+ if (target.enableLoveLive) {
419
+ const section = formatMonthlyBirthdays("Love Live!", lovelive_character_birthdays, lovelive_voice_actor_birthdays, month);
420
+ if (section) sections.push(section);
421
+ }
422
+ if (target.enableBangDream) {
423
+ const section = formatMonthlyBirthdays("BanG Dream!", bangdream_character_birthdays, bangdream_voice_actor_birthdays, month);
424
+ if (section) sections.push(section);
425
+ }
426
+ if (!sections.length && !friends.length) return;
427
+ const content = [`🎂 ${month} 月生日`, ...sections].join("\n\n");
428
+ if (!friends.length) return content;
429
+ return [
430
+ content,
431
+ "\n\n群友:",
432
+ ...friends.flatMap((friend) => [
433
+ `
434
+ ${friend.date} `,
435
+ (0, import_koishi.h)("at", { id: friend.id })
436
+ ])
437
+ ];
438
+ }
439
+ __name(createMonthlyQuery, "createMonthlyQuery");
440
+ function apply(ctx, config) {
441
+ extendModel(ctx);
442
+ const broadcast = /* @__PURE__ */ __name(async () => {
443
+ const targets = config.targets.filter(
444
+ (target) => target.enableLoveLive || target.enableBangDream || target.enableFriendBirthdays
445
+ );
446
+ if (!targets.length) return;
447
+ const now = /* @__PURE__ */ new Date();
448
+ const birthday = formatBirthday(getDateInTimeZone(now, "Asia/Tokyo"));
449
+ await Promise.all(targets.flatMap((target) => ctx.bots.filter((bot) => bot.platform === "onebot" && bot.selfId === target.onebotSelfId).map(async (bot) => {
450
+ try {
451
+ const friends = target.enableFriendBirthdays ? (await ctx.database.get("rina_birthday_friend", { date: birthday })).filter((friend) => appliesToGroup(friend.groups, target.groupId)) : [];
452
+ const content = createBroadcast(target, now, friends);
453
+ if (!content) return;
454
+ await bot.sendMessage(target.groupId, content);
455
+ } catch (error) {
456
+ bot.logger.warn(error);
457
+ }
458
+ })));
459
+ }, "broadcast");
460
+ ctx.command("生日 [month:number]", "查询本群当月生日;不填月份则查询本月。").action(async ({ session }, month) => {
461
+ const groupId = session?.channelId;
462
+ if (!groupId) return "请在群聊中使用该指令。";
463
+ if (month !== void 0 && (!Number.isInteger(month) || month < 1 || month > 12)) {
464
+ return "月份应为 1 到 12 的整数。";
465
+ }
466
+ const targetMonth = month ?? getDateInTimeZone(/* @__PURE__ */ new Date(), "Asia/Tokyo").month;
467
+ const target = config.targets.find(
468
+ (target2) => target2.groupId === groupId && target2.onebotSelfId === session.selfId
469
+ );
470
+ if (!target) return "当前群未配置生日播报。";
471
+ const friends = target.enableFriendBirthdays ? (await ctx.database.get("rina_birthday_friend", {})).filter(
472
+ (friend) => friend.date.startsWith(`${String(targetMonth).padStart(2, "0")}-`) && appliesToGroup(friend.groups, groupId)
473
+ ) : [];
474
+ const content = createMonthlyQuery(target, targetMonth, friends);
475
+ return content ?? `本群 ${targetMonth} 月没有可播报的生日信息。`;
476
+ });
477
+ ctx.cron("0 23 * * *", () => void broadcast());
478
+ }
479
+ __name(apply, "apply");
480
+ // Annotate the CommonJS export names for ESM import in node:
481
+ 0 && (module.exports = {
482
+ Config,
483
+ apply,
484
+ inject,
485
+ name
486
+ });
package/lib/model.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ import { Context } from 'koishi';
2
+ export interface FriendBirthday {
3
+ id: string;
4
+ nickname: string;
5
+ date: string;
6
+ groups: string;
7
+ }
8
+ declare module 'koishi' {
9
+ interface Tables {
10
+ rina_birthday_friend: FriendBirthday;
11
+ }
12
+ }
13
+ export declare function extendModel(ctx: Context): void;
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "koishi-plugin-rina-birthday",
3
+ "description": "群友/LoveLive/BanGDream生日播报",
4
+ "version": "0.0.1",
5
+ "main": "lib/index.js",
6
+ "typings": "lib/index.d.ts",
7
+ "files": [
8
+ "lib",
9
+ "dist"
10
+ ],
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "chatbot",
14
+ "koishi",
15
+ "plugin"
16
+ ],
17
+ "peerDependencies": {
18
+ "koishi": "^4.18.7"
19
+ },
20
+ "dependencies": {
21
+ "koishi-plugin-cron": "^3.1.0"
22
+ }
23
+ }
package/readme.md ADDED
@@ -0,0 +1,5 @@
1
+ # koishi-plugin-rina-birthday
2
+
3
+ [![npm](https://img.shields.io/npm/v/koishi-plugin-rina-birthday?style=flat-square)](https://www.npmjs.com/package/koishi-plugin-rina-birthday)
4
+
5
+ 群友/LoveLive/BanGDream生日播报