feat(discord-bot): add quete command
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m29s

This commit is contained in:
2026-04-21 22:51:53 +02:00
parent 1c9670711a
commit b8a2ecc0df
2 changed files with 22 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ import { tejtrackCommand } from "./tejtrack";
import { iconeCommand } from "./icone";
import { gemmesCommand } from "./gemmes";
import { resultCommand } from "./result";
import { queteCommand } from "./quete";
export type Command = (
message: OmitPartialGroupDMChannel<Message<boolean>>,
@@ -18,4 +19,5 @@ export const commands: Record<string, Command> = {
icone: iconeCommand,
gemmes: gemmesCommand,
result: resultCommand,
quete: queteCommand,
};

View File

@@ -0,0 +1,20 @@
import { EmbedBuilder } from "discord.js";
import type { Command } from "~/commands";
import { getLatestQuest } from "~/services/wov";
export const queteCommand: Command = async (message) => {
const quest = await getLatestQuest();
const color = parseInt(quest.quest.promoImagePrimaryColor.substring(1), 16);
await message.reply({
allowedMentions: {
repliedUser: false
},
embeds: [
new EmbedBuilder()
.setTitle("Quête actuelle")
.setImage(quest.quest.promoImageUrl)
.setColor(color),
],
});
};