Replit
β Guides | Setting up Strangebot for Replit!
Intro
Replit does not automatically update node to the latest version. **This is a problem as Strangebot runs on Discord.js V13
Migration to V13 will take a while, But once it is done, it is done forever!
Guide
Create a new repl. **Set the language as "Nix (Beta)" ** Language Setup
Go to the file "replit.nix" and copy the code below (You can get rid of cowsay if you want, but who doesnt love cowsay?) Save this file, Replit does this automatically... Sometimes
{ pkgs }: {
deps = [
pkgs.cowsay
pkgs.nodejs-16_x
];
}Go to the file ".replit" and change its contents to the code below. (We will change this later, this is just for our testing purposes)
run = "node test.js"
Create a new file named "test.js", its contents should look like this.
console.log(process.version)
5. Run the replit. The console should output the correct Node version. (Anything around V16) Something like this
Main part of Guide
Clone the git repository.
git clone https://github.com/saiteja-madha/discord-js-bot.git
Move the contents of the cloned folder into the main directory. Do this for all files Like this
(I do this by hand, There is probably a linux command I dont know that could do this for us.)
Go to the Shell and type
npm i
Go to the ".replit" file and make sure it looks like this
run = "node ."
Your Done! Now all you have to do is edit the config.js file and add your env secrets. Should look like this
Closing Remarks
Good job, Your bot is done. Replit is a really good host for discord bots as it allows for powerful machinery with low costs and 24/7 uptime. IMO, The hacker plan is the best plan for hosting a discord bot for beginners or even serious developers.
This guide was created by mid (mid#0002). My bot is available at https://www.beemo.best.
Join the Strangebot support server for any further help.
Last updated