Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Unanswered
Symphony Bot with selenium web driver?


Here is a full example which may help also referenced from the same page shared previously.

from symphony.bdk.core.activity.command import CommandContext
from symphony.bdk.core.config.loader import BdkConfigLoader
from symphony.bdk.core.symphony_bdk import SymphonyBdk


async def run():
    async with SymphonyBdk(BdkConfigLoader.load_from_symphony_dir("config.yaml")) as bdk:
        activities = bdk.activities()
        messages = bdk.messages()

        @activities.slash("/buy {$ticker} {quantity}")
        async def on_echo_mention(context: CommandContext):
            ticker = context.arguments.get_cashtag("ticker").value # can also be retrieved with context.arguments.get("ticker").value
            quantity = context.arguments.get_string("quantity")
            
            message = f"Buy ticker {ticker} with quantity {quantity}"

            await messages.send_message(context.stream_id, f"<messageML>{message}</messageML>")
  
  
Posted one year ago
Vinay Mistry
23 × 2 Administrator
  
  

May I ask a follow-up question?

If the case is:
Person A has said /buy {$ticker} {quantity} 1 minute ago and 1 hour ago respectively, and I want to open this bot to execute only the command for the request 1 minute ago (since I have executed the command for the 1 hour ago request already), can this be done?

Thank you

CY Wong   one year ago Report
334 Views
0 Answers
one year ago
one year ago