You are viewing a single comment's thread from:

RE: 🤖 TUTORIAL - Bots In The Background - Building bots With steem-js #7

in #utopian-io7 years ago

Hey Sam...

I noticed that my dice bot would crash ever few hours after running it in the browser, so I wanted to set it up using this tutorial.

I removed the HTML and script codes and added:
const steem = require('steem’);

I renamed the html file to bot.js and installed Node.js and the Steem package... so my directory is looking like I think it should...

When I get to the last part of Step 2 in this tutorial, I get this message:

In Atom, the Steem portion of the code and the account key suddenly went red... (the yellow is mine to mask the account details):

Do I have a problem there?

Thanks heaps!

Sort:  

hey dude it looks like you have different types of quote around 'steem’. Notice the first quote is ' (a vertical straight line) and the second quote is (comma moved to the top of the line). Sometimes called smart/dumb qoutes othertimes referenced as quotes vs speech marks. This could easily be copied from my code. I use IA Writer to write my posts and sometimes it autocorrects the quotes/speech mark to the fancier ones, I correct them when I remeber but I could easily have missed this one.

Duuuuuuuude!

That was amazing. That was exactly the problem... and I'm pretty sure I would have never figured that out myself... my inexperienced eyes wouldn't have realized the difference.

So... I've now set up my dice rolling bot to fun forever... but I'm super interested in setting it up to run on a server. How would you feel about setting up a tutorial on running bots on a free server? I set up a AWS account, and may have accidently signed up for a Lightsail server, but I haven't had much luck deciphering what to do next to run my script.

Thanks for all your help thus far... I've got quite a few bots I'm excited about setting up, so these tutorials really have been so crazy helpful to me.

haha no worries, it's so easy to miss things especially when you've been staring at the same chunk of code for a while. In general whenever you see a change in the syntax highlighting you don't expect something is wrong, can feel like you're losing your mind if you can't see it though.

Totally keen to do a "run on a server" tutorial. I'm always hesitant to direct people to AWS because it's pretty far from friendly. I'll see if there's a nice way to do it these days and if not I'll see what the best options are. 👍

I'm assuming you need your dice roll bat to run 24/7 ?

Hahahaha, I've definitely had moments where I've stared at code for ages... left it for a bit, and then found my error within a second of opening it again.

Yeah, AWS is really confusing.. I just tried it because it came up as free, but I think it's also trying to get me to pay $5 a month... so yeah, it's a bit odd..... but if there's a simpler low cost 24/7 option then that would be amazing.

I know I'm asking a lot for a tutorial specifically for what I'm interested in, but I hope it'll tie into your bot series nicely for others too. I really do appreciate how amazingly responsive you've been... you're pretty much the best.