@commands(u'cur', u'currency', u'exchange')
@example(u'.cur 20 EUR in USD')
def exchange(bot, trigger):
 if (not trigger.group(2)):
  return bot.reply(u'No search term. An example: .cur 20 EUR in USD')
 match = regex.match(trigger.group(2))
 if (not match):
  bot.reply(u"Sorry, I didn't understand the input.")
  return NOLIMIT
 (amount, of, to) = match.groups()
 try:
  amount = float(amount)
 except:
  bot.reply(u"Sorry, I didn't understand the input.")
 display(bot, amount, of, to)

@ commands ( u'cur' , u'currency' , u'exchange' ) @ example ( u'.cur 20 EUR in USD' ) def exchange ( bot , trigger ) : if ( not trigger . group ( 2 ) ) : return bot . reply ( u'No search term. An example: .cur 20 EUR in USD' ) match = regex . match ( trigger . group ( 2 ) ) if ( not match ) : bot . reply ( u"Sorry, I didn't understand the input." ) return NOLIMIT ( amount , of , to ) = match . groups ( ) try : amount = float ( amount ) except : bot . reply ( u"Sorry, I didn't understand the input." ) display ( bot , amount , of , to )
show the exchange rate between two currencies .