AnIdiotsGuide/discordjs-bot-guide

Interest in adding Repl.it guide?

amasad opened this issue · 6 comments

Hey folks -- awesome website!

Are you familiar with Repl.it? I'm the CEO and founder and we have a lot of users that are making Discord bots on our site. I know you have a guide on Glitch and they've been having troubles recently with bot hosting. Why I think Repl.it will not suffer the same consequences is because we built our infrastructure in a way that allows us to operate it more cheaply and because we're a sustainable business with multiple sources of revenue and have been around for a long time. We also have a close relationship with the folks at Discord and they even sponsored one of our competitions.

Let me know if you'd be interested in a guide. Happy to collaborate on one or contribute.

Thanks again for the great website. And sorry if a GitHub issue was not the best way to send this :)

Hello amasad,

Really sorry we didn't see this issue before! I wasn't watching this repository as we do most of our updates directly on gitbook. I'm very honored that you've seen the guide and want us to write a page for repl.it due to, yes, the unfortunate change of policy of glitch.com.

We will definitely be writing a repl.it guide in the short future (in fact, I'll get on that right away). It should have been done a while back, but life being what it is, my own time was filled with a lot of other projects and York, the other author, was unfortunately not available.

Thanks a lot for the interest in the guide, and for such a great system - I do use repl.it to do rapid prototyping of code, it's a great system :D

Hello @amasad, sorry for the delayed response, as eslachance has pointed out that we tend to do direct edits on the gitbook. After a brief internal discussion with eslachance, I felt motivated to start writing a guide, it's very very early stages right now, but I seem to have hit a small snag.

Discord.js, the library that we write our tutorials and guides for requires node version 12, and from what I have seen repl.it supports node version 10. I have had a look around the help sections, google searches and a number of things are saying (including one post by yourself) that you support node v12, but I cannot seem to figure out how to get my repl project to utilize it.

Any insight you could provide would be absolutely fantastic and amazing!

@amasad I've completed the guide, if you want to take a look at it! It should be sufficient for the vast majority of people. Note that I've not yet found a way to hide folders/files publicly (such as a data folder for sqlite files) so if you have any tips on that, we'd be very grateful. I asked the question on the discord but have yet to receive a reply.

https://anidiots.guide/hosting/repl

Thanks again!

Hey @eslachance! That looks awesome. We don't encourage storing data in files because we can't guarantee it's persisted. The hosting model on Repl.it is similar to PaaS or Serveless hosting solutions where it's encouraged to save data to external DB.

Luck has it that we just released a new dead-simple but high performance key-value store for every repl: https://docs.repl.it/misc/database

Simply go to a repl and look at the sidebar you'll see a database icon which will give you instructions.
image

If you need help let me know!

This is certainly something that we would need to look into in the future as it would probably require us to create a repl.it branch of our provided boilerplate bot.

Which wouldn't be a bad idea as I do plan on writing a guide on updating our provided bot code to work with repl.it's environmental variables, so updating it so it uses the key-value supplied by yourselves would be a good idea.

I've updated the guide to offer some information about the database, we'll see about perhaps making an example for points or server settings in the guide :)