Changing trigger - needs help

Started 1 month ago by nobody in TCL Support

Kia Ora, here's the code, works smoothly but is it possible to change the way code to make it smoother?   bind pub - !coin fetch_c...

Body

Kia Ora,

here's the code, works smoothly but is it possible to change the way code to make it smoother?

 

bind pub - !coin fetch_coin_command

# Function to handle the command
proc fetch_coin_command {nick host handle channel arg} {
    global botnick

    # Check if a symbol is provided
    if {[string length $arg] == 0} {
        putserv "PRIVMSG $channel :Usage: !coin <symbol>"
        return
    }

    # Fetch the coin data
    set data [fetch_coin_data $arg]

    # Send the data to the channel
    putserv "PRIVMSG $channel :$data"
}

 

  • !coin <coin_symbol> ex: !coin btc, !coin eth ,!coin xmr ... - script works well
  • is it possible to use !<coin_symbol instead? ex: !btc , !eth, !xmr ...

 

Cheers!

  • No one is replied to this thread yet. Be first to reply!
GU
Bottom ad position