finos / symphony-bdk-python

Symphony Python Bot Development Kit (BDK)
https://symphony-bdk-python.finos.org/
Apache License 2.0
31 stars 34 forks source link

#511 Add accessible slash command arguments #284

Closed symphony-soufiane closed 2 years ago

symphony-soufiane commented 2 years ago

Description

Closes #238 In this commit, we made slash command support string/cashtag/hashtag/mention arguments. We introduced slashCommandPattern class to represent the pattern to match user input. When user input matches the pattern provided in the slash command, we add arguments values in the commandContext in order to be used in the command callback logic. When a command required bot mention, we check bot user id instead of the display name. The command pattern is tokenised and user input as well. The matching consists of comparing the tokens values.

Checklist

symphony-soufiane commented 2 years ago

security-checks failing job should be fixed when https://github.com/finos/symphony-bdk-python/pull/289 is merged