From aac0ca49f8a389f7bab69c253e124032341d8b23 Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Mon, 28 Mar 2022 10:47:47 +0100 Subject: [PATCH] Add a link to the class update modal --- bot/src/webhookHandlers/classUpdate.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bot/src/webhookHandlers/classUpdate.ts b/bot/src/webhookHandlers/classUpdate.ts index fe7f0f9be..c06d02352 100644 --- a/bot/src/webhookHandlers/classUpdate.ts +++ b/bot/src/webhookHandlers/classUpdate.ts @@ -1,4 +1,5 @@ import { FormatGame, integer, WebhookEventClassUpdateV1 } from "tachi-common"; +import { BotConfig } from "../config"; import { client } from "../main"; import { GetUserInfo } from "../utils/apiRequests"; import { CreateEmbed } from "../utils/embeds"; @@ -26,6 +27,9 @@ export async function HandleClassUpdateV1( const embed = CreateEmbed() .setTitle(`${userDoc.username} just achieved ${newClass} in ${FormatGame(game, playtype)}!`) + .setURL( + `${BotConfig.TACHI_SERVER_LOCATION}/dashboard/users/${userDoc.username}/games/${game}/${playtype}` + ) .setThumbnail(PrependTachiUrl(`/users/${userDoc.id}/pfp`)); if (event.old !== null) {