Skip to content

Commit

Permalink
fix(techHelp): added 2000 char limit for entries & warn user of limit
Browse files Browse the repository at this point in the history
  • Loading branch information
theimperious1 committed Jul 1, 2024
1 parent f6cd14a commit e43aad0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/discord/utils/techHelp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export async function techHelpClick(interaction:ButtonInteraction) {
.setCustomId(`techHelpSubmit~${interaction.id}`)
.setTitle(`${interaction.guild.name} Feedback`)
.addComponents(new ActionRowBuilder<TextInputBuilder>().addComponents(new TextInputBuilder()
.setLabel('What is your issue? Be super detailed!')
.setLabel('What is your issue? Be super detailed! (2000 character limit)')
.setStyle(TextInputStyle.Paragraph)
.setPlaceholder(placeholder)
.setCustomId(`${issueType}IssueInput`)
Expand All @@ -93,6 +93,14 @@ export async function techHelpClick(interaction:ButtonInteraction) {
// Get whatever they sent in the modal
const modalInput = i.fields.getTextInputValue(`${issueType}IssueInput`);
// log.debug(F, `modalInput: ${modalInput}!`);

Check failure on line 96 in src/discord/utils/techHelp.ts

View workflow job for this annotation

GitHub Actions / Lint

Trailing spaces not allowed
if (modalInput.length > 2000) {
await interaction.reply({
content: 'Your feedback must be 2000 characters or less!',
ephemeral: true,
})

Check failure on line 101 in src/discord/utils/techHelp.ts

View workflow job for this annotation

GitHub Actions / Lint

Missing semicolon
return;
}

// // Get the actor
const actor = i.user;
Expand Down

0 comments on commit e43aad0

Please sign in to comment.