Skip to content

Commit

Permalink
Fix UX bugs in new Resume Review interactions (#379)
Browse files Browse the repository at this point in the history
* Don't allow just anyone to request an AI review

* Send typing indicator less frequently

* Oops this needs to return
  • Loading branch information
vcarl authored Jun 6, 2024
1 parent 47770f1 commit 32203ac
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
3 changes: 1 addition & 2 deletions src/features/resume-review.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,12 @@ const resumeReviewPdf: ChannelHandlers = {
return;
}

await message.channel.sendTyping();

const images = await buildResumeImages(message);
if (images.length === 0) {
return;
}

await message.channel.sendTyping();
cooldown.addCooldown(
message.author.id,
cooldownKey,
Expand Down
19 changes: 10 additions & 9 deletions src/features/resume.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,17 @@ export const resumeResources = async (bot: Client) => {
return;
}

if (interaction.user.id !== interaction.channel.ownerId) {
interaction.reply({
ephemeral: true,
content:
"This is not your thread! These interactions can only be used by the original poster.",
});
return;
}

if (interaction.customId === DELETE_COMMAND) {
if (interaction.user.id === interaction.channel.ownerId) {
await interaction.message.delete();
} else {
interaction.reply({
ephemeral: true,
content:
"This is not your thread! Posts can only be deleted by the original poster.",
});
}
await interaction.message.delete();
return;
}

Expand Down

0 comments on commit 32203ac

Please sign in to comment.