Unanswered
So below is an example in Python on how your bot can extract arguments from a Symphony chat message.
@activities.slash("/echo {first_string_argument} {second_string_argument}")
async def on_echo_string_arguments(context: CommandContext):
#Get string argument with get_string
first_string_argument = context.arguments.get_string("first_string_argument")
# Get string argument with get_as_string
second_string_argument = context.arguments.get_as_string("second_string_argument")
message = f"Received arguments: {first_string_argument} and {second_string_argument}"
await messages.send_message(context.stream_id, f"<messageML>{message}</messageML>")
In the example we are just returning the values back to the user in the form of a Symphony message. But you could invoke your own business logic (including a Selenium web driver class) to carry out another action.
503 Views
0
Answers
one year ago
one year ago
You can see more reference examples listed here as well. https://symphony-bdk-python.finos.org/markdown/activity-api.html#slash-command-pattern-format
Hi, I'm afraid the commands are collapsed and I'm unable to see your full response, may I ask would you mind sharing what is the response above "you can see more reference examples listed here as well. https://symphony-bdk-python.finos.org/markdown/activity-api.html#slash-command-pattern-format", thanks so much!