You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
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?
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.
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.
The text was updated successfully, but these errors were encountered: