From 5ab74c6cdff2d80404ce28b9dee8fb3c377f113f Mon Sep 17 00:00:00 2001 From: Shadow Date: Thu, 21 Nov 2024 04:07:33 -0500 Subject: [PATCH 1/2] fix(tripsitme): stop claiming yourself (#887) --- src/discord/utils/tripsitme.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/discord/utils/tripsitme.ts b/src/discord/utils/tripsitme.ts index 5e2efeff5..d5093712f 100644 --- a/src/discord/utils/tripsitme.ts +++ b/src/discord/utils/tripsitme.ts @@ -313,6 +313,11 @@ export async function tripsitmeOwned( const target = await interaction.guild.members.fetch(userId); + if (target.id === actor.id) { + await interaction.editReply({ content: "You can't own your own ticket!" }); + return; + } + const userData = await db.users.upsert({ where: { discord_id: userId, From 16b759e4e540f073ea267a700d1f7739dce90bd3 Mon Sep 17 00:00:00 2001 From: Shadow Date: Thu, 21 Nov 2024 04:55:05 -0500 Subject: [PATCH 2/2] (chore): max length for techhelp modal (#886) --- src/discord/utils/techHelp.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/discord/utils/techHelp.ts b/src/discord/utils/techHelp.ts index c5e215357..4e51497ba 100644 --- a/src/discord/utils/techHelp.ts +++ b/src/discord/utils/techHelp.ts @@ -80,7 +80,7 @@ export async function techHelpClick(interaction:ButtonInteraction) { .setCustomId(`${issueType}IssueInput`) .setRequired(true) .setMinLength(10) - .setMaxLength(2000)))); + .setMaxLength(1800)))); const filter = (i:ModalSubmitInteraction) => i.customId.includes('techHelpSubmit'); interaction.awaitModalSubmit({ filter, time: 0 })