philipdouglas / r2-d7

A bot for xwingtmg.slack.com
MIT License
13 stars 14 forks source link

Added prompt for user to delete their message #37

Closed Apollonaut13 closed 3 years ago

Apollonaut13 commented 3 years ago

When a user triggers a response from the bot, a short prompt pops up ("delete your message?") and attaches 2 emojis to itself (check mark / X). If the original user clicks the check mark, both the prompt and the trigger message get deleted. If the X is clicked, or 10 seconds elapse, the prompt gets deleted. As of the moment, this is untested in Slack, and if the original user adds an unaccounted-for emoji, nothing happens (but the message now cannot be deleted).

philipdouglas commented 3 years ago

I'm not sure I understand the problem that this is trying to solve. Could you explain the intent?

danrs commented 3 years ago

Apollo reached out to me about this and I think it looks handy - it streamlines the process of deleting the message that was used to trigger R2D7. This is particularly relevant when printing lists - users will often manually delete their message so it doesn't clog the chat with a big URL.

@Apollonaut13 please add your input

Apollonaut13 commented 3 years ago

As Dan said, many users of the bot were posting lists, then deleting their own message. This just helps speed up that process (and times out in 10 seconds, if they don't care to click on the option.) Here's a quick demo: https://i.gyazo.com/480c3105f0025dc1b8c64d2135005e9a.mp4

philipdouglas commented 3 years ago

Oh I see, I didn't understand how it was triggered. That's really handy.

I tried to look at the code again but now I'm just see the last commit and not any of the changes from the first two. Is something wrong with Github or the PR?

Apollonaut13 commented 3 years ago

I had deleted the code from the file that handled the prompt. I put it back just now. The embeds should still work with a footer as well.