Skip to content

Instantly share code, notes, and snippets.

@ukd1
Created August 12, 2017 04:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ukd1/2314c6d3350f6e9bece47a1bad91113c to your computer and use it in GitHub Desktop.
Save ukd1/2314c6d3350f6e9bece47a1bad91113c to your computer and use it in GitHub Desktop.
function faucet(session) {
// send $0.10 USD at current exchange rates
let amt = 0.1
let count = (session.get('count') || 0) + amt
session.set('count', count)
Fiat.fetch().then((toEth) => {
session.sendEth(toEth.USD(amt))
sendMessage(session, `Sent ${amt} 💰🤑💰`)
sendMessage(session, `FYI you've recieved ${count} eth from the me so far 😎`)
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment