├── .github
└── FUNDING.yml
├── LICENSE
├── README.md
├── assets
└── demo.gif
└── src-discord-cron-bot
├── config.json
├── handlers
└── ready.ts
├── intents.ts
└── types.ts
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: [peterthehan]
2 | patreon: peterthehan
3 | ko_fi: peterthehan
4 | custom: ["https://paypal.me/peterthehan", "https://venmo.com/peterthehan"]
5 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Peter Han
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.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Discord Cron Bot
2 |
3 | [](https://discord.gg/WjEFnzC) [](https://twitter.com/peterthehan)
4 |
5 | A Discord bot that sends messages on a schedule using cron expressions.
6 |
7 |
8 |

12 |
13 |
14 | ## Setup
15 |
16 | 1. Follow the instructions in [create-discord-bot](https://github.com/peterthehan/create-discord-bot).
17 |
18 | > Don't forget to give your bot the `Manage Webhooks` permission!
19 |
20 | 2. Download this bot and move the `src-discord-cron-bot` folder into the [/src/bots](https://github.com/peterthehan/create-discord-bot/tree/master/src/bots) folder from step 1.
21 |
22 | > Run `npm i cron@^1.8.2` and `npm i -D @types/cron@^1.7.3` to install this bot's dependencies.
23 |
24 | 3. Open [config.json](./src-discord-cron-bot/config.json) to configure your own settings:
25 |
26 | ```json
27 | {
28 | "timezone": "America/Los_Angeles",
29 | "rules": [
30 | {
31 | "cronExpression": "39 39 * * * *",
32 | "channelPolicy": "single",
33 | "messagePolicy": "single",
34 | "reactionPolicy": "single",
35 | "channelIds": ["747319121582096434"],
36 | "messages": [
37 | {
38 | "content": "<@&785794153089990688>, hourly reminder to hydrate!"
39 | }
40 | ],
41 | "reactions": ["🥤"]
42 | }
43 | ]
44 | }
45 | ```
46 |
47 | Add as many rules as you want to configure for other servers.
48 |
49 | - `timezone` is the timezone you wish to localize your `cronExpression` to.
50 | - `cronExpression` is the interval at which messages are sent.
51 | - `channelPolicy` **must** be one of the following strings:
52 | - `all`: Sends to every channel in `channelIds`.
53 | - `random`: Sends to a single random channel in `channelIds`.
54 | - `single`: Sends to the first channel in `channelIds`.
55 | - `messagePolicy` **must** be one of the following strings:
56 | - `all`: Sends all messages in `messages`.
57 | - `random`: Sends a single random message in `messages`.
58 | - `single`: Sends the first message in `messages`.
59 | - `reactionPolicy` **must** be one of the following strings:
60 | - `all`: Reacts with all emojis in `reactions` on the sent message(s).
61 | - `random`: Reacts with a single random emoji in `reactions` on the sent message(s).
62 | - `single`: Reacts with the first emoji in `reactions` on the sent message(s).
63 | - `channelIds` are the text channel(s) you want your message(s) to be forwarded to.
64 | - `messages` is a list of [WebhookMessageOptions](https://discord.js.org/#/docs/main/stable/typedef/WebhookMessageOptions).
65 | - `reactions` is a list of emojis. An emoji can be:
66 |
67 | - A unicode emoji. https://emojipedia.org is a good reference to copy and paste from.
68 |
69 | ```
70 | "😳", "🥺", // etc
71 | ```
72 |
73 | - An emoji ID for custom emojis. You can get a custom emoji's ID by sending `\:YourCustomEmoji:` in chat (prefix a backslash `\` character in front of your desired emoji).
74 |
75 | ```
76 | "716344914706694165", "622635442013208589", // etc
77 | ```
78 |
79 | Some useful resources:
80 |
81 | - [Moment Timezone](https://momentjs.com/timezone): find your `timezone` string.
82 | - [crontab guru](https://crontab.guru): build your `cronExpression`. Note that the tool does not support seconds but this bot configuration does.
83 | - [Embed Visualizer](https://leovoel.github.io/embed-visualizer): visualize your message content and embeds. Switch to `webhook` mode first.
84 |
85 | 4. `npm start` to run the bot.
86 |
87 | Visit for more help or information!
88 |
89 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/assets/demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterthehan/discord-cron-bot/811b36ac9880511cdbddce0c675cb54f28ed8ab3/assets/demo.gif
--------------------------------------------------------------------------------
/src-discord-cron-bot/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "timezone": "America/Los_Angeles",
3 | "rules": [
4 | {
5 | "cronExpression": "39 39 * * * *",
6 | "channelPolicy": "single",
7 | "messagePolicy": "single",
8 | "reactionPolicy": "single",
9 | "channelIds": ["747319121582096434"],
10 | "messages": [
11 | {
12 | "content": "<@&785794153089990688>, hourly hydration reminder!"
13 | }
14 | ],
15 | "reactions": ["🥤"]
16 | },
17 | {
18 | "cronExpression": "0 0 */8 * * *",
19 | "channelPolicy": "random",
20 | "messagePolicy": "single",
21 | "channelIds": [
22 | "418990932399226882",
23 | "264627745177206786",
24 | "419681885166239744",
25 | "747319121582096434",
26 | "755818716641624104",
27 | "266041562033553408",
28 | "765411104372817990",
29 | "755136985856737321"
30 | ],
31 | "messages": [
32 | {
33 | "content": "Vote by reacting with ⭐ on any message to nominate it for the <#752760008483012639>!"
34 | }
35 | ]
36 | },
37 | {
38 | "cronExpression": "0 30 8 * * 3",
39 | "channelPolicy": "single",
40 | "messagePolicy": "single",
41 | "channelIds": ["755818716641624104"],
42 | "messages": [
43 | {
44 | "embeds": [
45 | {
46 | "description": "It is Wednesday, my dudes",
47 | "image": {
48 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/wednesday/bpwednesday.png"
49 | }
50 | }
51 | ]
52 | }
53 | ]
54 | },
55 | {
56 | "cronExpression": "0 30 8 * * 3",
57 | "channelPolicy": "single",
58 | "messagePolicy": "single",
59 | "channelIds": ["266041562033553408"],
60 | "messages": [
61 | {
62 | "embeds": [
63 | {
64 | "description": "It is Wednesday, my dudes",
65 | "image": {
66 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/wednesday/seimeiwednesday.png"
67 | }
68 | }
69 | ]
70 | }
71 | ]
72 | },
73 | {
74 | "cronExpression": "0 15 */8 * * *",
75 | "channelPolicy": "random",
76 | "messagePolicy": "single",
77 | "channelIds": [
78 | "755818716641624104",
79 | "266041562033553408",
80 | "765411104372817990",
81 | "755136985856737321"
82 | ],
83 | "messages": [
84 | {
85 | "embeds": [
86 | {
87 | "author": {
88 | "name": "Donate",
89 | "url": "https://discord.gg/WjEFnzC",
90 | "icon_url": "https://cdn.discordapp.com/avatars/206161807491072000/0f6781d4abf525885c40780a294387da.webp"
91 | },
92 | "fields": [
93 | {
94 | "name": "Patreon",
95 | "value": "https://patreon.com/peterthehan"
96 | },
97 | { "name": "Ko-fi", "value": "https://ko-fi.com/peterthehan" },
98 | { "name": "Venmo", "value": "https://venmo.com/peterthehan" },
99 | { "name": "PayPal", "value": "https://paypal.me/peterthehan" }
100 | ]
101 | }
102 | ]
103 | }
104 | ]
105 | },
106 | {
107 | "cronExpression": "0 30 */8 * * *",
108 | "channelPolicy": "random",
109 | "messagePolicy": "single",
110 | "channelIds": [
111 | "755818716641624104",
112 | "266041562033553408",
113 | "765411104372817990",
114 | "755136985856737321"
115 | ],
116 | "messages": [
117 | {
118 | "embeds": [
119 | {
120 | "author": {
121 | "name": "Referrals",
122 | "url": "https://discord.gg/WjEFnzC",
123 | "icon_url": "https://cdn.discordapp.com/avatars/206161807491072000/0f6781d4abf525885c40780a294387da.webp"
124 | },
125 | "fields": [
126 | { "name": "Mint Mobile", "value": "http://fbuy.me/pDJGn" },
127 | {
128 | "name": "Google Pay",
129 | "value": "https://g.co/payinvite/ap29r4l"
130 | },
131 | { "name": "Uber Eats", "value": "eats-peterh22294ue" },
132 | {
133 | "name": "Lyft",
134 | "value": "https://www.lyft.com/i/PETER46806"
135 | },
136 | {
137 | "name": "Robinhood",
138 | "value": "https://join.robinhood.com/peterh808"
139 | }
140 | ]
141 | }
142 | ]
143 | }
144 | ]
145 | },
146 | {
147 | "cronExpression": "0 45 */8 * * *",
148 | "channelPolicy": "random",
149 | "messagePolicy": "single",
150 | "channelIds": [
151 | "755818716641624104",
152 | "266041562033553408",
153 | "765411104372817990",
154 | "755136985856737321"
155 | ],
156 | "messages": [
157 | {
158 | "embeds": [
159 | {
160 | "author": {
161 | "name": "Follow",
162 | "url": "https://discord.gg/WjEFnzC",
163 | "icon_url": "https://cdn.discordapp.com/avatars/206161807491072000/0f6781d4abf525885c40780a294387da.webp"
164 | },
165 | "fields": [
166 | {
167 | "name": "Twitter",
168 | "value": "https://twitter.com/PeterTheHan\nhttps://twitter.com/NoContextWeeb"
169 | },
170 | { "name": "GitHub", "value": "https://github.com/peterthehan" },
171 | {
172 | "name": "MyAnimeList",
173 | "value": "https://myanimelist.net/profile/PeterTheHan"
174 | }
175 | ]
176 | }
177 | ]
178 | }
179 | ]
180 | },
181 | {
182 | "cronExpression": "0 0 16 * * *",
183 | "channelPolicy": "single",
184 | "messagePolicy": "single",
185 | "channelIds": ["418990932399226882"],
186 | "messages": [
187 | {
188 | "username": "Sakurafish",
189 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
190 | "embeds": [
191 | {
192 | "description": "Every day until you like it.",
193 | "image": {
194 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish.png"
195 | }
196 | }
197 | ]
198 | }
199 | ]
200 | },
201 | {
202 | "cronExpression": "0 10 16 * * *",
203 | "channelPolicy": "single",
204 | "messagePolicy": "random",
205 | "channelIds": ["755818716641624104"],
206 | "messages": [
207 | {
208 | "username": "Amiyafish",
209 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
210 | "embeds": [
211 | {
212 | "description": "Every day until you like it.",
213 | "image": {
214 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/amiyafish.png"
215 | }
216 | }
217 | ]
218 | },
219 | {
220 | "username": "BluePoisonfish",
221 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
222 | "embeds": [
223 | {
224 | "description": "Every day until you like it.",
225 | "image": {
226 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/bluepoisonfish.png"
227 | }
228 | }
229 | ]
230 | },
231 | {
232 | "username": "Castlefish",
233 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
234 | "embeds": [
235 | {
236 | "description": "Every day until you like it.",
237 | "image": {
238 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/castlefish.png"
239 | }
240 | }
241 | ]
242 | },
243 | {
244 | "username": "Cliffheartfish",
245 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
246 | "embeds": [
247 | {
248 | "description": "Every day until you like it.",
249 | "image": {
250 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/cliffheartfish.png"
251 | }
252 | }
253 | ]
254 | },
255 | {
256 | "username": "Cuorafish",
257 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
258 | "embeds": [
259 | {
260 | "description": "Every day until you like it.",
261 | "image": {
262 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/cuorafish.png"
263 | }
264 | }
265 | ]
266 | },
267 | {
268 | "username": "DeepColorfish",
269 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
270 | "embeds": [
271 | {
272 | "description": "Every day until you like it.",
273 | "image": {
274 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/deepcolorfish.png"
275 | }
276 | }
277 | ]
278 | },
279 | {
280 | "username": "Durinfish",
281 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
282 | "embeds": [
283 | {
284 | "description": "Every day until you like it.",
285 | "image": {
286 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/durinfish.png"
287 | }
288 | }
289 | ]
290 | },
291 | {
292 | "username": "Ethanfish",
293 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
294 | "embeds": [
295 | {
296 | "description": "Every day until you like it.",
297 | "image": {
298 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/ethanfish.png"
299 | }
300 | }
301 | ]
302 | },
303 | {
304 | "username": "Exusiaifish",
305 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
306 | "embeds": [
307 | {
308 | "description": "Every day until you like it.",
309 | "image": {
310 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/exusiaifish.png"
311 | }
312 | }
313 | ]
314 | },
315 | {
316 | "username": "Fangfish",
317 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
318 | "embeds": [
319 | {
320 | "description": "Every day until you like it.",
321 | "image": {
322 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/fangfish.png"
323 | }
324 | }
325 | ]
326 | },
327 | {
328 | "username": "Firewatchfish",
329 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
330 | "embeds": [
331 | {
332 | "description": "Every day until you like it.",
333 | "image": {
334 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/firewatchfish.png"
335 | }
336 | }
337 | ]
338 | },
339 | {
340 | "username": "Fishmontis",
341 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
342 | "embeds": [
343 | {
344 | "description": "Every day until you like it.",
345 | "image": {
346 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/fishmontis.png"
347 | }
348 | }
349 | ]
350 | },
351 | {
352 | "username": "Gravelfish",
353 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
354 | "embeds": [
355 | {
356 | "description": "Every day until you like it.",
357 | "image": {
358 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/gravelfish.png"
359 | }
360 | }
361 | ]
362 | },
363 | {
364 | "username": "Gummyfish",
365 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
366 | "embeds": [
367 | {
368 | "description": "Every day until you like it.",
369 | "image": {
370 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/gummyfish.png"
371 | }
372 | }
373 | ]
374 | },
375 | {
376 | "username": "Hibiscusfish",
377 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
378 | "embeds": [
379 | {
380 | "description": "Every day until you like it.",
381 | "image": {
382 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/hibiscusfish.png"
383 | }
384 | }
385 | ]
386 | },
387 | {
388 | "username": "Hoshigumafish",
389 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
390 | "embeds": [
391 | {
392 | "description": "Every day until you like it.",
393 | "image": {
394 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/hoshigumafish.png"
395 | }
396 | }
397 | ]
398 | },
399 | {
400 | "username": "Jessicafish",
401 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
402 | "embeds": [
403 | {
404 | "description": "Every day until you like it.",
405 | "image": {
406 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/jessicafish.png"
407 | }
408 | }
409 | ]
410 | },
411 | {
412 | "username": "Kroosfish",
413 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
414 | "embeds": [
415 | {
416 | "description": "Every day until you like it.",
417 | "image": {
418 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/kroosfish.png"
419 | }
420 | }
421 | ]
422 | },
423 | {
424 | "username": "Lancetfish",
425 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
426 | "embeds": [
427 | {
428 | "description": "Every day until you like it.",
429 | "image": {
430 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/lancetfish.png"
431 | }
432 | }
433 | ]
434 | },
435 | {
436 | "username": "Magallanfish",
437 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
438 | "embeds": [
439 | {
440 | "description": "Every day until you like it.",
441 | "image": {
442 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/magallanfish.png"
443 | }
444 | }
445 | ]
446 | },
447 | {
448 | "username": "Mayfish",
449 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
450 | "embeds": [
451 | {
452 | "description": "Every day until you like it.",
453 | "image": {
454 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/mayfish.png"
455 | }
456 | }
457 | ]
458 | },
459 | {
460 | "username": "Moussefish",
461 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
462 | "embeds": [
463 | {
464 | "description": "Every day until you like it.",
465 | "image": {
466 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/moussefish.png"
467 | }
468 | }
469 | ]
470 | },
471 | {
472 | "username": "Nianfish",
473 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
474 | "embeds": [
475 | {
476 | "description": "Every day until you like it.",
477 | "image": {
478 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/nianfish.png"
479 | }
480 | }
481 | ]
482 | },
483 | {
484 | "username": "Nightingalefish",
485 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
486 | "embeds": [
487 | {
488 | "description": "Every day until you like it.",
489 | "image": {
490 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/nightingalefish.png"
491 | }
492 | }
493 | ]
494 | },
495 | {
496 | "username": "ProjektRedfish",
497 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
498 | "embeds": [
499 | {
500 | "description": "Every day until you like it.",
501 | "image": {
502 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/projektredfish.png"
503 | }
504 | }
505 | ]
506 | },
507 | {
508 | "username": "Ptilopsisfish",
509 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
510 | "embeds": [
511 | {
512 | "description": "Every day until you like it.",
513 | "image": {
514 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/ptilopsisfish.png"
515 | }
516 | }
517 | ]
518 | },
519 | {
520 | "username": "Purestreamfish",
521 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
522 | "embeds": [
523 | {
524 | "description": "Every day until you like it.",
525 | "image": {
526 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/purestreamfish.png"
527 | }
528 | }
529 | ]
530 | },
531 | {
532 | "username": "Reedfish",
533 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
534 | "embeds": [
535 | {
536 | "description": "Every day until you like it.",
537 | "image": {
538 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/reedfish.png"
539 | }
540 | }
541 | ]
542 | },
543 | {
544 | "username": "Scenefish",
545 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
546 | "embeds": [
547 | {
548 | "description": "E v e r y d a y u n t i l y o u l i k e i t .",
549 | "image": {
550 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/scenefish.png"
551 | }
552 | }
553 | ]
554 | },
555 | {
556 | "username": "Schwarzfish",
557 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
558 | "embeds": [
559 | {
560 | "description": "Every day until you like it.",
561 | "image": {
562 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/schwarzfish.png"
563 | }
564 | }
565 | ]
566 | },
567 | {
568 | "username": "Shawfish",
569 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
570 | "embeds": [
571 | {
572 | "description": "Everydayuntilyoulikeit.",
573 | "image": {
574 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/shawe2fish.png"
575 | }
576 | }
577 | ]
578 | },
579 | {
580 | "username": "Shawfish",
581 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
582 | "embeds": [
583 | {
584 | "description": "Everydayuntilyoulikeit.",
585 | "image": {
586 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/shawfish.png"
587 | }
588 | }
589 | ]
590 | },
591 | {
592 | "username": "Shiningfish",
593 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
594 | "embeds": [
595 | {
596 | "description": "Every day until you like it.",
597 | "image": {
598 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/shiningfish.png"
599 | }
600 | }
601 | ]
602 | },
603 | {
604 | "username": "Shiningfish",
605 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
606 | "embeds": [
607 | {
608 | "description": "Every day until you like it.",
609 | "image": {
610 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/shiningsummerfish.png"
611 | }
612 | }
613 | ]
614 | },
615 | {
616 | "username": "Shirayukifish",
617 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
618 | "embeds": [
619 | {
620 | "description": "Every day until you like it.",
621 | "image": {
622 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/shirayukifish.png"
623 | }
624 | }
625 | ]
626 | },
627 | {
628 | "username": "Skadifish",
629 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
630 | "embeds": [
631 | {
632 | "description": "Every day until you like it.",
633 | "image": {
634 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/skadifish.png"
635 | }
636 | }
637 | ]
638 | },
639 | {
640 | "username": "Sorafish",
641 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
642 | "embeds": [
643 | {
644 | "description": "Every day until you like it.",
645 | "image": {
646 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/sorafish.png"
647 | }
648 | }
649 | ]
650 | },
651 | {
652 | "username": "Specterfish",
653 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
654 | "embeds": [
655 | {
656 | "description": "Every day until you like it.",
657 | "image": {
658 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/specterfish.png"
659 | }
660 | }
661 | ]
662 | },
663 | {
664 | "username": "Spotfish",
665 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
666 | "embeds": [
667 | {
668 | "description": "Every day until you like it.",
669 | "image": {
670 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/spotfish.png"
671 | }
672 | }
673 | ]
674 | },
675 | {
676 | "username": "Swirefish",
677 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
678 | "embeds": [
679 | {
680 | "description": "Every day until you like it.",
681 | "image": {
682 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/swirefish.png"
683 | }
684 | }
685 | ]
686 | },
687 | {
688 | "username": "Vermeilfish",
689 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
690 | "embeds": [
691 | {
692 | "description": "Every day until you like it.",
693 | "image": {
694 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/vermeilfish.png"
695 | }
696 | }
697 | ]
698 | },
699 | {
700 | "username": "Vignafish",
701 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
702 | "embeds": [
703 | {
704 | "description": "Every day until you like it.",
705 | "image": {
706 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/vignafish.png"
707 | }
708 | }
709 | ]
710 | },
711 | {
712 | "username": "Yatofish",
713 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
714 | "embeds": [
715 | {
716 | "description": "Every day until you like it.",
717 | "image": {
718 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/ak/yatofish.png"
719 | }
720 | }
721 | ]
722 | }
723 | ]
724 | },
725 | {
726 | "cronExpression": "0 20 16 * * *",
727 | "channelPolicy": "single",
728 | "messagePolicy": "random",
729 | "channelIds": ["266041562033553408"],
730 | "messages": [
731 | {
732 | "username": "Borgosfish",
733 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
734 | "embeds": [
735 | {
736 | "description": "Every day until you like it.",
737 | "image": {
738 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/cq/borgosfish.png"
739 | }
740 | }
741 | ]
742 | },
743 | {
744 | "username": "D'Artagnanfish",
745 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
746 | "embeds": [
747 | {
748 | "description": "Every day until you like it.",
749 | "image": {
750 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/cq/dartfish.png"
751 | }
752 | }
753 | ]
754 | },
755 | {
756 | "username": "Fergusfish",
757 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
758 | "embeds": [
759 | {
760 | "description": "Every day until you like it.",
761 | "image": {
762 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/cq/cheffergusfish.png"
763 | }
764 | }
765 | ]
766 | },
767 | {
768 | "username": "Hallafish",
769 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
770 | "embeds": [
771 | {
772 | "description": "Every day until you like it.",
773 | "image": {
774 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/cq/hallafish.png"
775 | }
776 | }
777 | ]
778 | },
779 | {
780 | "username": "Jackfish",
781 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
782 | "embeds": [
783 | {
784 | "description": "Every day until you like it.",
785 | "image": {
786 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/cq/jackfish.png"
787 | }
788 | }
789 | ]
790 | },
791 | {
792 | "username": "Kaorifish",
793 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
794 | "embeds": [
795 | {
796 | "description": "Every day until you like it.",
797 | "image": {
798 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/cq/kaorifish.png"
799 | }
800 | }
801 | ]
802 | },
803 | {
804 | "username": "Korinfish",
805 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
806 | "embeds": [
807 | {
808 | "description": "Every day until you like it.",
809 | "image": {
810 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/cq/korinfish.png"
811 | }
812 | }
813 | ]
814 | },
815 | {
816 | "username": "Leefish",
817 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
818 | "embeds": [
819 | {
820 | "description": "Every day until you like it.",
821 | "image": {
822 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/cq/leefish.png"
823 | }
824 | }
825 | ]
826 | },
827 | {
828 | "username": "Soltarfish",
829 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
830 | "embeds": [
831 | {
832 | "description": "Every day until you like it.",
833 | "image": {
834 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/cq/soltarfish.png"
835 | }
836 | }
837 | ]
838 | },
839 | {
840 | "username": "Teresafish",
841 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
842 | "embeds": [
843 | {
844 | "description": "Every day until you like it.",
845 | "image": {
846 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/cq/teresafish.png"
847 | }
848 | }
849 | ]
850 | }
851 | ]
852 | },
853 | {
854 | "cronExpression": "0 30 16 * * *",
855 | "channelPolicy": "single",
856 | "messagePolicy": "random",
857 | "channelIds": ["765411104372817990"],
858 | "messages": [
859 | {
860 | "username": "Albedofish",
861 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
862 | "embeds": [
863 | {
864 | "description": "Every day until you like it.",
865 | "image": {
866 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/albedofish.png"
867 | }
868 | }
869 | ]
870 | },
871 | {
872 | "username": "Amberfish",
873 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
874 | "embeds": [
875 | {
876 | "description": "Every day until you like it.",
877 | "image": {
878 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/amberfish.png"
879 | }
880 | }
881 | ]
882 | },
883 | {
884 | "username": "Barbarafish",
885 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
886 | "embeds": [
887 | {
888 | "description": "Every day until you like it.",
889 | "image": {
890 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/barbarafish.png"
891 | }
892 | }
893 | ]
894 | },
895 | {
896 | "username": "Beidoufish",
897 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
898 | "embeds": [
899 | {
900 | "description": "Every day until you like it.",
901 | "image": {
902 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/beidoufish.png"
903 | }
904 | }
905 | ]
906 | },
907 | {
908 | "username": "Bennettfish",
909 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
910 | "embeds": [
911 | {
912 | "description": "Every day until you like it.",
913 | "image": {
914 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/bennettfish.png"
915 | }
916 | }
917 | ]
918 | },
919 | {
920 | "username": "Chongyunfish",
921 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
922 | "embeds": [
923 | {
924 | "description": "Every day until you like it.",
925 | "image": {
926 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/chongyunfish.png"
927 | }
928 | }
929 | ]
930 | },
931 | {
932 | "username": "Dilucfish",
933 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
934 | "embeds": [
935 | {
936 | "description": "Every day until you like it.",
937 | "image": {
938 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/dilucfish.png"
939 | }
940 | }
941 | ]
942 | },
943 | {
944 | "username": "Dionafish",
945 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
946 | "embeds": [
947 | {
948 | "description": "Every day until you like it.",
949 | "image": {
950 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/dionafish.png"
951 | }
952 | }
953 | ]
954 | },
955 | {
956 | "username": "Fischlfish",
957 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
958 | "embeds": [
959 | {
960 | "description": "Every day until you like it.",
961 | "image": {
962 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/fischlfish.png"
963 | }
964 | }
965 | ]
966 | },
967 | {
968 | "username": "Ganyufish",
969 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
970 | "embeds": [
971 | {
972 | "description": "Every day until you like it.",
973 | "image": {
974 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/ganyufish.png"
975 | }
976 | }
977 | ]
978 | },
979 | {
980 | "username": "Hu Taofish",
981 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
982 | "embeds": [
983 | {
984 | "description": "Every day until you like it.",
985 | "image": {
986 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/hutaofish.png"
987 | }
988 | }
989 | ]
990 | },
991 | {
992 | "username": "Jeanfish",
993 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
994 | "embeds": [
995 | {
996 | "description": "Every day until you like it.",
997 | "image": {
998 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/jeanfish.png"
999 | }
1000 | }
1001 | ]
1002 | },
1003 | {
1004 | "username": "Kaeyafish",
1005 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1006 | "embeds": [
1007 | {
1008 | "description": "Every day until you like it.",
1009 | "image": {
1010 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/kaeyafish.png"
1011 | }
1012 | }
1013 | ]
1014 | },
1015 | {
1016 | "username": "Keqingfish",
1017 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1018 | "embeds": [
1019 | {
1020 | "description": "Every day until you like it.",
1021 | "image": {
1022 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/keqingfish.png"
1023 | }
1024 | }
1025 | ]
1026 | },
1027 | {
1028 | "username": "Kleefish",
1029 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1030 | "embeds": [
1031 | {
1032 | "description": "Every day until you like it.",
1033 | "image": {
1034 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/kleefish.png"
1035 | }
1036 | }
1037 | ]
1038 | },
1039 | {
1040 | "username": "Lisafish",
1041 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1042 | "embeds": [
1043 | {
1044 | "description": "Every day until you like it.",
1045 | "image": {
1046 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/lisafish.png"
1047 | }
1048 | }
1049 | ]
1050 | },
1051 | {
1052 | "username": "Monafish",
1053 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1054 | "embeds": [
1055 | {
1056 | "description": "Every day until you like it.",
1057 | "image": {
1058 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/monafish.png"
1059 | }
1060 | }
1061 | ]
1062 | },
1063 | {
1064 | "username": "Ningguangfish",
1065 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1066 | "embeds": [
1067 | {
1068 | "description": "Every day until you like it.",
1069 | "image": {
1070 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/ningguangfish.png"
1071 | }
1072 | }
1073 | ]
1074 | },
1075 | {
1076 | "username": "Noellefish",
1077 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1078 | "embeds": [
1079 | {
1080 | "description": "Every day until you like it.",
1081 | "image": {
1082 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/noellefish.png"
1083 | }
1084 | }
1085 | ]
1086 | },
1087 | {
1088 | "username": "Qiqifish",
1089 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1090 | "embeds": [
1091 | {
1092 | "description": "Every day until you like it.",
1093 | "image": {
1094 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/qiqifish.png"
1095 | }
1096 | }
1097 | ]
1098 | },
1099 | {
1100 | "username": "Razorfish",
1101 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1102 | "embeds": [
1103 | {
1104 | "description": "Every day until you like it.",
1105 | "image": {
1106 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/razorfish.png"
1107 | }
1108 | }
1109 | ]
1110 | },
1111 | {
1112 | "username": "Sucrosefish",
1113 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1114 | "embeds": [
1115 | {
1116 | "description": "Every day until you like it.",
1117 | "image": {
1118 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/sucrosefish.png"
1119 | }
1120 | }
1121 | ]
1122 | },
1123 | {
1124 | "username": "Tartagliafish",
1125 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1126 | "embeds": [
1127 | {
1128 | "description": "Every day until you like it.",
1129 | "image": {
1130 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/tartagliafish.png"
1131 | }
1132 | }
1133 | ]
1134 | },
1135 | {
1136 | "username": "Travelerfish",
1137 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1138 | "embeds": [
1139 | {
1140 | "description": "Every day until you like it.",
1141 | "image": {
1142 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/travelerffish.png"
1143 | }
1144 | }
1145 | ]
1146 | },
1147 | {
1148 | "username": "Travelerfish",
1149 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1150 | "embeds": [
1151 | {
1152 | "description": "Every day until you like it.",
1153 | "image": {
1154 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/travelermfish.png"
1155 | }
1156 | }
1157 | ]
1158 | },
1159 | {
1160 | "username": "Ventifish",
1161 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1162 | "embeds": [
1163 | {
1164 | "description": "Every day until you like it.",
1165 | "image": {
1166 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/ventifish.png"
1167 | }
1168 | }
1169 | ]
1170 | },
1171 | {
1172 | "username": "Xianglingfish",
1173 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1174 | "embeds": [
1175 | {
1176 | "description": "Every day until you like it.",
1177 | "image": {
1178 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/xianglingfish.png"
1179 | }
1180 | }
1181 | ]
1182 | },
1183 | {
1184 | "username": "Xiaofish",
1185 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1186 | "embeds": [
1187 | {
1188 | "description": "Every day until you like it.",
1189 | "image": {
1190 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/xiaofish.png"
1191 | }
1192 | }
1193 | ]
1194 | },
1195 | {
1196 | "username": "Xingqiufish",
1197 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1198 | "embeds": [
1199 | {
1200 | "description": "Every day until you like it.",
1201 | "image": {
1202 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/xingqiufish.png"
1203 | }
1204 | }
1205 | ]
1206 | },
1207 | {
1208 | "username": "Xinyanfish",
1209 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1210 | "embeds": [
1211 | {
1212 | "description": "Every day until you like it.",
1213 | "image": {
1214 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/xinyanfish.png"
1215 | }
1216 | }
1217 | ]
1218 | },
1219 | {
1220 | "username": "Zhonglifish",
1221 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1222 | "embeds": [
1223 | {
1224 | "description": "Every day until you like it.",
1225 | "image": {
1226 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gi/zhonglifish.png"
1227 | }
1228 | }
1229 | ]
1230 | }
1231 | ]
1232 | },
1233 | {
1234 | "cronExpression": "0 40 16 * * *",
1235 | "channelPolicy": "single",
1236 | "messagePolicy": "random",
1237 | "channelIds": ["755136985856737321"],
1238 | "messages": [
1239 | {
1240 | "username": "416fish",
1241 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1242 | "embeds": [
1243 | {
1244 | "description": "Every day until you like it.",
1245 | "image": {
1246 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gfl/416fish.png"
1247 | }
1248 | }
1249 | ]
1250 | },
1251 | {
1252 | "username": "AK47fish",
1253 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1254 | "embeds": [
1255 | {
1256 | "description": "Every day until you like it.",
1257 | "image": {
1258 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gfl/ak47fish.png"
1259 | }
1260 | }
1261 | ]
1262 | },
1263 | {
1264 | "username": "CMSfish",
1265 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1266 | "embeds": [
1267 | {
1268 | "description": "Every day until you like it.",
1269 | "image": {
1270 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gfl/cmsfish.png"
1271 | }
1272 | }
1273 | ]
1274 | },
1275 | {
1276 | "username": "Coltfish",
1277 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1278 | "embeds": [
1279 | {
1280 | "description": "Every day until you like it.",
1281 | "image": {
1282 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gfl/coltfish.png"
1283 | }
1284 | }
1285 | ]
1286 | },
1287 | {
1288 | "username": "CZ75fish",
1289 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1290 | "embeds": [
1291 | {
1292 | "description": "Every day until you like it.",
1293 | "image": {
1294 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gfl/cz75fish.png"
1295 | }
1296 | }
1297 | ]
1298 | },
1299 | {
1300 | "username": "FALfish",
1301 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1302 | "embeds": [
1303 | {
1304 | "description": "Every day until you like it.",
1305 | "image": {
1306 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gfl/falfish.png"
1307 | }
1308 | }
1309 | ]
1310 | },
1311 | {
1312 | "username": "Fish7",
1313 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1314 | "embeds": [
1315 | {
1316 | "description": "Every day until you like it.",
1317 | "image": {
1318 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gfl/fish7.png"
1319 | }
1320 | }
1321 | ]
1322 | },
1323 | {
1324 | "username": "FishMOD",
1325 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1326 | "embeds": [
1327 | {
1328 | "description": "Every day until you like it.",
1329 | "image": {
1330 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gfl/fishmod.png"
1331 | }
1332 | }
1333 | ]
1334 | },
1335 | {
1336 | "username": "Helianfish",
1337 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1338 | "embeds": [
1339 | {
1340 | "description": "Every day until you like it.",
1341 | "image": {
1342 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gfl/helianfish.png"
1343 | }
1344 | }
1345 | ]
1346 | },
1347 | {
1348 | "username": "Hunterfish",
1349 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1350 | "embeds": [
1351 | {
1352 | "description": "Every day until you like it.",
1353 | "image": {
1354 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gfl/hunterfish.png"
1355 | }
1356 | }
1357 | ]
1358 | },
1359 | {
1360 | "username": "Kalinafish",
1361 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1362 | "embeds": [
1363 | {
1364 | "description": "Every day until you like it.",
1365 | "image": {
1366 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gfl/kalinafish.png"
1367 | }
1368 | }
1369 | ]
1370 | },
1371 | {
1372 | "username": "Kryugerfish",
1373 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1374 | "embeds": [
1375 | {
1376 | "description": "Every day until you like it.",
1377 | "image": {
1378 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gfl/kryugerfish.png"
1379 | }
1380 | }
1381 | ]
1382 | },
1383 | {
1384 | "username": "M9fish",
1385 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1386 | "embeds": [
1387 | {
1388 | "description": "Every day until you like it.",
1389 | "image": {
1390 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gfl/m9fish.png"
1391 | }
1392 | }
1393 | ]
1394 | },
1395 | {
1396 | "username": "MDRfish",
1397 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1398 | "embeds": [
1399 | {
1400 | "description": "Every day until you like it.",
1401 | "image": {
1402 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gfl/mdrfish.png"
1403 | }
1404 | }
1405 | ]
1406 | },
1407 | {
1408 | "username": "Rescuefish",
1409 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1410 | "embeds": [
1411 | {
1412 | "description": "Every day until you like it.",
1413 | "image": {
1414 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gfl/rescuefish.png"
1415 | }
1416 | }
1417 | ]
1418 | },
1419 | {
1420 | "username": "SATfish",
1421 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1422 | "embeds": [
1423 | {
1424 | "description": "Every day until you like it.",
1425 | "image": {
1426 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gfl/satfish.png"
1427 | }
1428 | }
1429 | ]
1430 | },
1431 | {
1432 | "username": "SOPfish",
1433 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1434 | "embeds": [
1435 | {
1436 | "description": "Every day until you like it.",
1437 | "image": {
1438 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gfl/sopfish.png"
1439 | }
1440 | }
1441 | ]
1442 | },
1443 | {
1444 | "username": "Vectorfish",
1445 | "avatarURL": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/sakurafish_avatar.png",
1446 | "embeds": [
1447 | {
1448 | "description": "Every day until you like it.",
1449 | "image": {
1450 | "url": "https://raw.githubusercontent.com/peterthehan/assets/master/fish/gfl/vectorfish.png"
1451 | }
1452 | }
1453 | ]
1454 | }
1455 | ]
1456 | }
1457 | ]
1458 | }
1459 |
--------------------------------------------------------------------------------
/src-discord-cron-bot/handlers/ready.ts:
--------------------------------------------------------------------------------
1 | import { CronJob } from "cron";
2 | import {
3 | Client,
4 | EmojiResolvable,
5 | Message,
6 | Snowflake,
7 | TextChannel,
8 | Webhook,
9 | WebhookMessageOptions,
10 | } from "discord.js";
11 | import { Config, CronRuleItem, Policy, Rule } from "../types";
12 | import config from "../config.json";
13 |
14 | const getRandomInt = (min: number, max: number): number => {
15 | min = Math.ceil(min);
16 | max = Math.floor(max);
17 | return Math.floor(Math.random() * (max - min) + min);
18 | };
19 |
20 | class CronBot {
21 | client: Client;
22 | rule: Rule;
23 |
24 | constructor(client: Client, rule: Rule) {
25 | this.client = client;
26 | this.rule = rule;
27 | }
28 |
29 | sendMessages(): void {
30 | const channelIds = this._applyPolicyToList(
31 | this.rule.channelPolicy,
32 | this.rule.channelIds
33 | ) as Snowflake[];
34 | const messages = this._applyPolicyToList(
35 | this.rule.messagePolicy,
36 | this.rule.messages
37 | ) as WebhookMessageOptions[];
38 | const reactions = this._applyPolicyToList(
39 | this.rule.reactionPolicy,
40 | this.rule.reactions
41 | ) as EmojiResolvable[];
42 |
43 | channelIds.forEach(async (channelId) => {
44 | const webhook = await this._getWebhook(channelId);
45 |
46 | messages.forEach(async (message) => {
47 | const newMessage = (await webhook.send(message)) as Message;
48 |
49 | reactions.forEach(async (reaction) => await newMessage.react(reaction));
50 | });
51 | });
52 | }
53 |
54 | private _applyPolicyToList(
55 | policy?: Policy,
56 | list?: CronRuleItem[]
57 | ): CronRuleItem[] {
58 | if (!policy || !list || list.length === 0) {
59 | return [];
60 | }
61 |
62 | switch (policy) {
63 | case "all":
64 | return list;
65 | case "random":
66 | return [list[getRandomInt(0, list.length)]];
67 | case "single":
68 | default:
69 | return [list[0]];
70 | }
71 | }
72 |
73 | private async _getWebhook(channelId: Snowflake): Promise {
74 | const channel = (await this.client.channels.fetch(
75 | channelId
76 | )) as TextChannel;
77 | const webhooks = await channel.fetchWebhooks();
78 |
79 | return !webhooks.size
80 | ? channel.createWebhook(this.client.user?.username || "📢")
81 | : (webhooks.first() as Webhook);
82 | }
83 | }
84 |
85 | module.exports = async (client: Client): Promise => {
86 | console.log(__dirname.split("\\").slice(-2)[0]);
87 |
88 | (config as Config).rules.forEach((rule) => {
89 | const bot = new CronBot(client, rule);
90 | new CronJob(
91 | rule.cronExpression,
92 | () => bot.sendMessages(),
93 | null,
94 | true,
95 | config.timezone
96 | );
97 | });
98 | };
99 |
--------------------------------------------------------------------------------
/src-discord-cron-bot/intents.ts:
--------------------------------------------------------------------------------
1 | module.exports = [];
2 |
--------------------------------------------------------------------------------
/src-discord-cron-bot/types.ts:
--------------------------------------------------------------------------------
1 | import { EmojiResolvable, Snowflake, WebhookMessageOptions } from "discord.js";
2 |
3 | export interface Config {
4 | timezone: string;
5 | rules: Rule[];
6 | }
7 |
8 | export interface Rule {
9 | cronExpression: string;
10 | channelPolicy: Policy;
11 | messagePolicy: Policy;
12 | reactionPolicy?: Policy;
13 | channelIds: Snowflake[];
14 | messages: WebhookMessageOptions[];
15 | reactions?: EmojiResolvable[];
16 | }
17 |
18 | export type Policy = "all" | "random" | "single";
19 |
20 | export type CronRuleItem = Snowflake | WebhookMessageOptions | EmojiResolvable;
21 |
--------------------------------------------------------------------------------