Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally ping user within bot command's message #240

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ScriptyChris
Copy link

Hey, i noticed that it's a bit inconvenient that often people have to ping a folk, which they just notified about some hint (like how to properly attach a code or how to properly ask a question) via the bot - so first message is calling the bot with i.e. !code command and, after the bot replies, one has to add like "hey @ScriptyChris please take a look ☝️ " to actually notify other person about the given hint. So i prepared an enhancement that if a certain command is used with pings added and/or it's a reply, then bot will automatically forward these pings in a form of prefixed message to the response command.

Currently (for starters) the feature is hooked up with commands: !ask, !code (!gist), !ping.
Looking forward for a feedback. 👍

I hope that below screens present the change more readably than my description. :)

Before:

image

After:

image
image

@ScriptyChris ScriptyChris added the enhancement New feature or request label Jul 25, 2022
@ScriptyChris ScriptyChris requested a review from vcarl July 25, 2022 18:14
@ghost
Copy link

ghost commented Jul 25, 2022

👇 Click on the image for a new way to code review
  • Make big changes easier — review code in small groups of related files

  • Know where to start — see the whole change at a glance

  • Take a code tour — explore the change with an interactive tour

  • Make comments and review — all fully sync’ed with github

    Try it now!

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map Legend

@nickserv
Copy link
Member

nickserv commented Jul 25, 2022

This could also be a good use case for message commands (which we're already using for moderation)

@vcarl
Copy link
Member

vcarl commented Jul 25, 2022

I'm not sure that there's much confusion over who the intended recipient is when these commands are invoked, is that something you've noticed much of?

@ScriptyChris
Copy link
Author

@nickmccurdy What application commands do you mean?
@vcarl I think that some people (especially new comers) might not be aware that a bot's hint is directed to them. I guess this is why they are often pinged below the bot's reply - this enhancement is just making it a bit more convenient.

@vcarl
Copy link
Member

vcarl commented Jul 25, 2022

My concern is that this change results in those members getting pinged twice, which I think is confusing in a different direction. It's not obviously a straight improvement to the experience in my eyes

@nickserv
Copy link
Member

@nickmccurdy What application commands do you mean?

@ScriptyChris I meant to say message commands. They're a type of application command that shows up when you open the context menu for a message.

My concern is that this change results in those members getting pinged twice, which I think is confusing in a different direction. It's not obviously a straight improvement to the experience in my eyes

@vcarl That's a good point. Could we fix this by having the mention in a slash command?

@ScriptyChris
Copy link
Author

@nickmccurdy you mean this?

image

What would be the difference between invoking a command (i.e. !code) as it is now vs from that menu?

@vcarl you mean "pinged twice", because some might not notice that the bot already pinged a person? It's fair argument, although if somebody would ping a person while using the command, then i don't think they would do it again after bot posts a message. Also, this enhancement is opt-in, because if one doesn't suffix the command with ping, then bot won't use that ping, so it will work as it has been so far. Also, i don't see a much of an issue if somebody would be pinged in two messages in a row - like... it can already happen if two different people reply to a person using the ping.

@vcarl
Copy link
Member

vcarl commented Jul 27, 2022

How does this look, functionally? Would need some other supporting logic to help transition from !commands to slash commands but i wanted to rough out an approach

Screen Shot 2022-07-27 at 10 18 05 AM

Screen Shot 2022-07-27 at 10 18 14 AM

Screen Shot 2022-07-27 at 10 18 31 AM

Screen.Recording.2022-07-27.at.10.20.06.AM.mp4

@ScriptyChris
Copy link
Author

To me it looks more powerful than my enhancement proposal, because multiple commands can be used at once and there is command name auto-completion (as opposed to !<command-name> syntax). So 👍 from me.

@nickserv
Copy link
Member

nickserv commented Jul 27, 2022

@vcarl Can you please open a PR so I can also push? I'd like to try to merge my WIP into this. That should help us support commands like MDN with more args and make it easier to refactor things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants