Skip to content

Commit

Permalink
clarify /kenny (#223)
Browse files Browse the repository at this point in the history
* clarify `/kenny`

* stop referencing the API
  • Loading branch information
horrible-little-slime authored Aug 30, 2024
1 parent f1c1543 commit e462b54
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/oaf/src/commands/misc/kenny.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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(
Expand Down

0 comments on commit e462b54

Please sign in to comment.