Created
March 13, 2021 16:13
-
-
Save nicolaschenet/f79c381f6720e52425487bf8e61c1616 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Send update via Telegram | |
const res = await Promise.all(Object.keys(output?.exchanges).map(async exchangeCode => { | |
const exchange = output?.exchanges?.[exchangeCode] | |
await require("@pipedreamhq/platform").axios(this, { | |
method: 'POST', | |
url: `https://api.telegram.org/bot${auths.telegram_bot_api.token}/sendMessage`, | |
data: { | |
chat_id: steps.setup.$return_value.telegramChatID, | |
text: `Hey! I just updated your allocations on ${exchangeCode}, because the crypto weather just updated to ${exchange.weather} ;)` | |
} | |
}) | |
})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I stored the weather in every exchange... should go directly in
output