From e462b545d82dbaf785e6d9846eb707054bd37af9 Mon Sep 17 00:00:00 2001 From: neil <78829653+horrible-little-slime@users.noreply.github.com> Date: Fri, 30 Aug 2024 10:43:33 -0400 Subject: [PATCH] clarify `/kenny` (#223) * clarify `/kenny` * stop referencing the API --- packages/oaf/src/commands/misc/kenny.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/oaf/src/commands/misc/kenny.ts b/packages/oaf/src/commands/misc/kenny.ts index e60279d..dde5bdd 100644 --- a/packages/oaf/src/commands/misc/kenny.ts +++ b/packages/oaf/src/commands/misc/kenny.ts @@ -20,6 +20,9 @@ export function makeComment(data: { isHigh: boolean; isLow: boolean }) { return "That's fine."; } +const KENNY_TOO_HIGH = 180; +const KENNY_TOO_LOW = 70; + export async function execute(interaction: ChatInputCommandInteraction) { await interaction.deferReply(); @@ -44,7 +47,7 @@ export async function execute(interaction: ChatInputCommandInteraction) { `Kenny's blood glucose 🩸 was ${latest.value}mg/dL ${time( latest.date, TimestampStyles.RelativeTime, - )}. ${makeComment(latest)}`, + )}. ${makeComment({ isHigh: latest.value >= KENNY_TOO_HIGH, isLow: latest.value <= KENNY_TOO_LOW })}`, ); } catch (error) { return void (await interaction.editReply(