-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
85 lines (73 loc) · 4.2 KB
/
Copy pathconfig.example.yaml
File metadata and controls
85 lines (73 loc) · 4.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# hoyo-codes configuration.
#
# Copy to config.yaml (gitignored — it holds your webhook URLs) and edit:
# cp config.example.yaml config.yaml
# docker-compose mounts ./config.yaml into the container read-only.
# How often to check for new codes. Standard 5-field cron.
schedule: "*/30 * * * *"
# IANA timezone the schedule runs in (e.g. "Europe/Amsterdam"). Optional;
# defaults to the container's TZ. Only affects cron timing.
timezone: "Europe/Amsterdam"
# On a game's FIRST run (no prior state), record all currently-active codes as
# already-sent instead of announcing them. true (default) prevents spamming the
# whole backlog of old codes on first boot. Set false to announce the backlog.
markExistingOnFirstRun: true
# Run one check immediately on startup, in addition to the schedule. Default true.
runOnStart: true
# Per-request HTTP timeout, seconds. Default 20.
httpTimeout: 20
# Cap on how many checks may fail to announce a given code before we give up on
# it (mark it done without posting). Stops a persistently broken webhook or a bug
# from retrying and log-spamming forever. Each failing check counts as one
# attempt; a successful post resets nothing (the code is simply done). Default 10
# (≈5h of retries on the default 30-min schedule).
maxPostAttempts: 10
# Base URL of a self-hosted OpenGachaCodes instance (read-only HTTP JSON API). It
# supplements the built-in HoYoverse sources for the games it also serves
# (genshin, hsr, zzz) and is the SOLE source for non-HoYo games like `wuwa`.
# Leave empty/omit to disable it entirely. No trailing slash needed (trimmed).
# It has no CORS/auth and refreshes ~every 30 min; call it server-side only.
opengachaBaseUrl: "http://localhost:8413"
# Games to watch. ONLY the games listed here are watched — to stop watching one,
# comment it out or delete it (there's no enable/disable flag). Each listed game
# REQUIRES both a `webhook` and a `message` (startup fails otherwise). Known keys:
# genshin (Genshin Impact), hsr (Honkai: Star Rail), zzz (Zenless Zone Zero),
# honkai3rd (Honkai Impact 3rd), wuwa (Wuthering Waves),
# endfield (Arknights: Endfield)
# `wuwa` and `endfield` are served ONLY by OpenGachaCodes, so they need
# opengachaBaseUrl set above.
games:
genshin:
webhook: "https://discord.com/api/webhooks/xxx/yyy"
# Placeholders: {count} = number of new codes. {if-singular:X}/{if-plural:X}
# keep X only when count is 1 / not 1 (the other is dropped) — handles
# irregular plurals and other languages. To ping a role, drop its mention
# token into the message: <@&ROLE_ID> (Dev Mode -> right-click role -> Copy ID).
message: "<@&000000000000000000> {count} new Genshin Impact {if-singular:code}{if-plural:codes} 🎁"
# Optional per-game sender identity. `username` overrides the sender name;
# `avatarUrl` is a public image URL (PNG/JPG/GIF) Discord fetches as the
# avatar. Omit either to fall back to the default name / the webhook's own
# avatar.
username: "Genshin Codes"
avatarUrl: "https://example.com/genshin-avatar.png"
hsr:
# Post Star Rail to a different channel, with its own sender name:
webhook: "https://discord.com/api/webhooks/aaa/bbb"
message: "<@&111111111111111111> Trailblazers — {count} new {if-singular:code}{if-plural:codes}!"
username: "Star Rail Codes"
# To stop watching a game, comment it out (or delete it) — only listed games run:
# honkai3rd:
# webhook: "https://discord.com/api/webhooks/ccc/ddd"
# message: "{count} new Honkai Impact 3rd {if-singular:code}{if-plural:codes}"
# Wuthering Waves — codes come only from OpenGachaCodes, so opengachaBaseUrl
# (above) must be set for this game to work. Redeemed in-game (no web link).
# wuwa:
# webhook: "https://discord.com/api/webhooks/eee/fff"
# message: "<@&222222222222222222> {count} new Wuthering Waves {if-singular:code}{if-plural:codes} 🌊"
# username: "Wuthering Waves Codes"
# Arknights: Endfield — also OpenGachaCodes-only (needs opengachaBaseUrl),
# redeemed in-game (no web link).
# endfield:
# webhook: "https://discord.com/api/webhooks/ggg/hhh"
# message: "<@&333333333333333333> {count} new Arknights: Endfield {if-singular:code}{if-plural:codes}"
# username: "Endfield Codes"