You should use a Roblox library instead of managing the cookie yourself. There’s no point in reinventing the wheel - libraries like noblox.js and rblx simplify this process for the developer.
TypeScript is unnecessary for this tutorial, as you don’t seem to utilize types anywhere
Going along with the last one, if TypeScript isn’t required, you don’t need to install VSC and can dive straight into Replit from the beginning.
although this is the case most of the time, for this example we were setting the about page. Which can’t be done with noblox. And dont get started with rblx, why would I want to use a module with 6 weekly downloads?
You dont only need to use typescript for types. I prefer to use typescript as that will show errors inside the code. Rather than testing it and then realizing there’s an error
You could, but replit doesn’t have a very good ide experience. I prefer to write code in VSC and move to replit.
it seems like you didn’t even read the guide and simply went through it with all this nonsense criticism
Both noblox and rblx are just examples (although rblx does allow you to set a description). You’re able to use any library you want; the point is that for a beginner’s tutorial on how to use NodeJS to make a Roblox bot, it should be simple & beginner-friendly. A simple method like user.setDescription() is much friendlier than sending an HTTP request with node-fetch.
That’s true, but this is a beginner’s tutorial. Simplification is key if you want to really have the end-user understand exactly what you’re doing. Plus, they shouldn’t need to worry about errors if they’re using code from a tutorial.
Again, simplification. The copying from the out dir, discarding the old .env file, and installing local packages when you don’t need them are extra steps that can confuse the reader. It’s better to have a few well-explained steps than many steps that can leave the reader with questions.
Criticism is normal, and my points aren’t necessarily wrong. I don’t benefit from giving my criticism - you do. I’m giving you my thoughts on how you can improve this tutorial so future viewers will understand how to reach the end result without potentially leaving with questions, like why TypeScript was necessary, or why there’s a code editor and a decently sized node_modules folder on their hard drive that’s not being used. By diving straight into Replit, the VSC & NodeJS/npm installations can be skipped.
If you’d like to continue this, my DMs are open I don’t want to further clog this thread.
There’s a section at the end of the tutorial where it pings the hosting URL, but even that isn’t effective as repls will completely refresh every once in a while and therefore stops the setInterval loop.
@TheH0meLands
I would look into UptimeRobot. The free tier is enough and has kept my Discord bots alive for well over a year.
hmm seems like a good idea. I used this method of pinging for a lot of my bots and didn’t encounter any down time. While with uptimerobot, my bot would go down every once in a while. I’ll try looking into it and update the guide as needed.
it’s never happened to me? I believe cookies only reset when someone logs into your account from a different IP. Not when you use the roblox api(i think)
theres not even an issue in the first place. The cookie doesn’t reset on replit. It only resets when another ip logs into your account.
Bots use the roblox api to do actions. Cookies only reset when someone logs into your account from a different ip. Using the roblox api on behalf of another account doesnt(i believe.)
I use replit for all my bot hosting and I was able to host my bot for around 2 months straight and no cookie resetting whatsoever.
theres no need for you to be rude. Im simply saying the cookie wont reset whatsoever due to replit. Would you please provide some sources?
I assume you’re talking about the ip changes resetting cookies. But that only affects you when someone logs into your account, not when you use the roblox api.
const noblox=require('noblox.js')
const token=process.env.TOKEN; // .ROBLOSECURITY
async function startApp () {
const currentUser=await noblox.setCookie(token) // This will cause to reset cookie on replit
console.log(`Logged in as ${currentUser.UserName} [${currentUser.UserID}]`)
}
startApp()