- Step 1: Open
.env.example - Step 2: Put the required values and rename it to
.env - Step 3: Open the terminal and run
npm install. This installs all the necessary packages - Step 4: Run
node register.js. This registers the slash commands to the guild - Step 5: Finally run
node index.jsin your terminal
- Step 1: Open
env.example - Step 2: Put the required values and rename it to
.env - Step 3: Run
docker-compose build - Step 4: Finally run
docker-compose up
- By default,
register.jsregisters the commands for single server. To register commands for all servers the bot is in, go toregister.js, comment the code from line 43 - 46 and uncomment the code from line 48 - 51 - Sharding is not recommended for bots that are in less than 2,000 servers. To remove sharding, delete
index.js, delete./events/shardError.jsand renameapp.jstoindex.js.
You can join our server for any self hosting related issues or any problem with the bot.
If you want to use replit.com to run your code 24/7, follow these steps
- Step 1: Go to the terminal and run
npm install express - Step 2: Inside the root directory, create a file called
server.js - Step 3: Paste the code below into
server.js
const express = require('express')
const server = express();
server.all('/', (req, res) => {
res.send('OK')
})
function keepAlive() {
server.listen(3000, () => {
console.log("Server is ready!")
});
}
module.exports = keepAlive;- Step 4: Go to
index.jsand at the top of the code, addconst keepAlive = require('./server.js'); - Step 5: Before the sharding manager is created, call the
keepAlive()function. Your final code should look something like this:
const keepAlive = require('./server.js');
const { ShardingManager } = require('discord.js');
.
.
keepAlive();
const manager = new ShardingManager('./app.js', { token: token });
.
.- Step 6: Hit the "Run" button
- Lo-FI: https://plofier.streamafrica.net/lofi
- Zen: https://streaming.positivity.radio/pr/calm/icecast.audio
- Radio Stream: https://radio-browser.info
Made with ❤️ and JavaScript!