Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add 50xx series discord notification groups #3193

Merged
merged 2 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/reference/notification.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ Refer to https://github.com/node-apn/node-apn for config options.
| `DISCORD_NOTIFY_GROUP_4080_12G` | Discord group to notify on 4080 12G stock |
| `DISCORD_NOTIFY_GROUP_4080_16G` | Discord group to notify on 4080 16G stock |
| `DISCORD_NOTIFY_GROUP_4090` | Discord group to notify on 4090 stock |
| `DISCORD_NOTIFY_GROUP_5070` | Discord group to notify on 5070 stock |
| `DISCORD_NOTIFY_GROUP_5070TI` | Discord group to notify on 5070 Ti stock |
| `DISCORD_NOTIFY_GROUP_5080` | Discord group to notify on 5080 stock |
| `DISCORD_NOTIFY_GROUP_5090` | Discord group to notify on 5090 stock |
| `DISCORD_NOTIFY_GROUP_RYZEN5600` | Discord group to notify on 5600X stock |
| `DISCORD_NOTIFY_GROUP_RYZEN5800` | Discord group to notify on 5800X stock |
| `DISCORD_NOTIFY_GROUP_RYZEN5900` | Discord group to notify on 5900X stock |
Expand Down
4 changes: 4 additions & 0 deletions dotenv-example
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ DISCORD_NOTIFY_GROUP_3090=
DISCORD_NOTIFY_GROUP_4080_12G=
DISCORD_NOTIFY_GROUP_4080_16G=
DISCORD_NOTIFY_GROUP_4090=
DISCORD_NOTIFY_GROUP_5070=
DISCORD_NOTIFY_GROUP_5070TI=
DISCORD_NOTIFY_GROUP_5080=
DISCORD_NOTIFY_GROUP_5090=
DISCORD_NOTIFY_GROUP_CORSAIR_SF=
DISCORD_NOTIFY_GROUP_RX6800=
DISCORD_NOTIFY_GROUP_RX6800XT=
Expand Down
4 changes: 4 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,10 @@
'4080-12g': envOrArray(process.env.DISCORD_NOTIFY_GROUP_4080_12G),
'4080-16g': envOrArray(process.env.DISCORD_NOTIFY_GROUP_4080_16G),
4090: envOrArray(process.env.DISCORD_NOTIFY_GROUP_4090),
5070: envOrArray(process.env.DISCORD_NOTIFY_GROUP_5070),
'5070ti': envOrArray(process.env.DISCORD_NOTIFY_GROUP_5070TI),
5080: envOrArray(process.env.DISCORD_NOTIFY_GROUP_5080),
5090: envOrArray(process.env.DISCORD_NOTIFY_GROUP_5090),
'captcha-deterrent': [],
darkhero: envOrArray(process.env.DISCORD_NOTIFY_GROUP_DARKHERO),
rx6700xt: envOrArray(process.env.DISCORD_NOTIFY_GROUP_RX6700XT),
Expand Down Expand Up @@ -544,8 +548,8 @@
restartTime,
};

export function setConfig(newConfig: any) {

Check warning on line 551 in src/config.ts

View workflow job for this annotation

GitHub Actions / Build and lint

Unexpected any. Specify a different type
const writeConfig = config as any;

Check warning on line 552 in src/config.ts

View workflow job for this annotation

GitHub Actions / Build and lint

Unexpected any. Specify a different type
for (const key of Object.keys(newConfig)) {
writeConfig[key] = newConfig[key];
}
Expand Down
Loading