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

give suggestions for likely misspellings of commands #26

Open
davidschlangen opened this issue Nov 29, 2018 · 2 comments
Open

give suggestions for likely misspellings of commands #26

davidschlangen opened this issue Nov 29, 2018 · 2 comments

Comments

@davidschlangen
Copy link
Contributor

All messages are compared to the list of currently registered commands. If a message could be a misspelling of one of those (e.g., leading slash missing), then a private message is sent to the originator of that message.

E.g., in meetup, someone types "\done". This can be recognised as an attempt to type the command "done" (i.e., to type "/done"). A private message is sent: "Did you mean to type "/done"? Remember that commands can only be recognised if written correctly, with a leading forward slash "/"."

This requires some fuzzy string matching, but should be relatively straightforward. Should only be tested for single word messages, and then go through list of all currently registered command.

(I've used fuzzywuzzy for something like this before: https://github.com/seatgeek/fuzzywuzzy . Might even be overkill here.)

This could be done via the intercept mechanism and on the level of individual bots, but since commands are a server-side thing, and a very general thing, this seems better placed (as an option) in the server.

@TimDiekmann
Copy link
Collaborator

This could be done via the intercept mechanism and at the level of individual bots but since commands are a server-side thing, and a very general thing, this seems better placed (as an option) in the server.

The bots have to decide which message is parsed as a command, otherwise, it is simply sent as a message (in the general case), so it is not possible for the server to distinguish between messages and commands without further knowledge. I suggest adding an example to clp-research/slurk-bots instead? Or let the server interpret every message starting with / as command?

@phisad
Copy link
Contributor

phisad commented Apr 27, 2021

interpret every message starting with / as command?

I think this is the right way to go, because users usually dont want others in the room to see the commands. Its rather directed towards slurk or a bot. Well, the next decision would be then "where to detect commands" either one the client side (and then send as a command event) or on the server side (send from client as normal text). Sending as a command event would be a bit more explicit from an implementation perspective and thus might be preferred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants