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
But msg.get("text") contains the complete user input, which is for karmabot always @karmabot command <argument>. This leads to unnecessary parsing of this text in each command function that needs the optional argument. So each command has to split the text and determine if there is a third optional argument part. I suggest simplifying the API and pass as text only the third part, that is, the command argument. This is None if None was given and a text otherwise.
The text was updated successfully, but these errors were encountered:
pogross
added
the
Internal
Changes not directly visible to the user: speed improvements, unit tests
label
Sep 8, 2020
pogross
changed the title
[Improvement] Only pass command arguments as message to commands
Only pass command arguments as message to commands
Sep 22, 2020
Currently, each command gets the complete user text as message:
But
msg.get("text")
contains the complete user input, which is for karmabot always@karmabot command <argument>
. This leads to unnecessary parsing of this text in each command function that needs the optional argument. So each command has to split the text and determine if there is a third optional argument part. I suggest simplifying the API and pass as text only the third part, that is, the command argument. This isNone
if None was given and a text otherwise.The text was updated successfully, but these errors were encountered: