feat(discord-bot): allow non-gems rewards
All checks were successful
Build and Push Docker Image / build (push) Successful in 45s

This commit is contained in:
Pihkaal
2026-01-04 21:07:37 +01:00
parent 877402090f
commit d5f1719db1
3 changed files with 13 additions and 9 deletions

View File

@@ -23,6 +23,7 @@ const schema = z.object({
.string()
.transform((x) => x.split(",").map((x) => x.trim()))
.optional(),
QUEST_REWARDS_ARE_GEMS: z.boolean(),
QUEST_EXCLUDE: z
.string()
.transform((x) => x.split(",").map((x) => x.trim()))

View File

@@ -27,6 +27,7 @@ export const makeResultEmbed = async (
`- ${medals[i]} ${x.username} - ${env.QUEST_REWARDS![i]} gemmes`,
);
if (env.QUEST_REWARDS_ARE_GEMS) {
const arr = rewardedParticipants.slice(
0,
Math.min(rewardedParticipants.length, env.QUEST_REWARDS.length),
@@ -38,6 +39,7 @@ export const makeResultEmbed = async (
balance + parseInt(env.QUEST_REWARDS![i]),
);
}
}
rewardsEmbed = {
title: "Récompenses",

View File

@@ -53,6 +53,7 @@ services:
- WOV_FETCH_INTERVAL
- WOV_TRACKING_INTERVAL
- QUEST_REWARDS
- QUEST_REWARDS_ARE_GEMS
- QUEST_EXCLUDE
networks: