Skip to content

Commit

Permalink
Added char limit to talk-to-mods feedback popup
Browse files Browse the repository at this point in the history
* fix(techHelp): added 2000 char limit for entries & warn user of limit

* fix(lint): missing semicolon k

* fix(techHelp): switched to discord min/max length functions, removed warning

---------

Co-authored-by: LunaUrsa <[email protected]>
  • Loading branch information
theimperious1 and LunaUrsa authored Jul 3, 2024
1 parent 78df03e commit b66daa6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/discord/utils/techHelp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ export async function techHelpClick(interaction:ButtonInteraction) {
.setStyle(TextInputStyle.Paragraph)
.setPlaceholder(placeholder)
.setCustomId(`${issueType}IssueInput`)
.setRequired(true))));
.setRequired(true)
.setMinLength(10)
.setMaxLength(2000))));

const filter = (i:ModalSubmitInteraction) => i.customId.includes('techHelpSubmit');
interaction.awaitModalSubmit({ filter, time: 0 })
Expand Down

0 comments on commit b66daa6

Please sign in to comment.