Byteball Bytes
$34.56 0%
GBYTE · 121w

Byteball Bot Wars progress report #2 – Monetizing content and APIs with Byteball: Error Fare Alerts Bot

Intro  

This is what happened until end of last week, you should read it before continuing with this post, if you have not read it yet, to get the context.

Here you can find the repo again. 

I am still on my honeymoon and alive - and it is rainy today, so it is a good time to write the final report :) This was the next steps plan from the last report:  

Create dummy DB and setup a stream and  push functionality so that I get a notification for every new Error Fare into  the Bot for testing.  Change the code of the bot so it pushes the notification to the chat every time a new error fare comes.  Change the code of the bot so that it only pushes deals into the chat if the balance of the user is enough and  reduces the balance after each sent link.  Change from local environment to hosting the bot on a VM.  Add referral program.  Dynamic pricing (at the moment price is hard coded, maybe I will change that, so that it is stable in EUR and dynamically generates the needed Bytes).  Publish in Byteball Bot Store :)

If I want to survive my honeymoon vacation I don´t think I get it all done during the timeframe of the Great Byteball Bot Wars, but I hope to get point 1 to point 2 done until the Bot wars are over at least. If you don´t hear back from me I spent too much time on building this bot and my wife killed me :D      

I got quite some progress and finished more than expected: Point 1, 2, 3 and 4 are more or less done J So let´s have a deeper look on what has been done on those points and the Lessons Learned:  

1. Create dummy DB and setup a stream and push functionality so that I get a notification for every new Error Fare into the Bot for testing.   

Code: 

First of all we need a server that can listen to push messages / POST requests. 

This is how I have done it: 

const http = require('http') const server = http.createServer((req, res) => {     if (req.method === 'POST') {        ...
Continue on steemit.com
Recent news
No posts found