Code Monkey home page Code Monkey logo

lite's Introduction

❗Prerequisites❗

📝 Setup

  • 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.js in your terminal

📝 Setup with Docker

  • 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

NOTE:

  • By default, register.js registers the commands for single server. To register commands for all servers the bot is in, go to register.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.js and rename app.js to index.js.

You can join our server for any self hosting related issues or any problem with the bot.

Replit Guide

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.js and at the top of the code, add const 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

Stream URLs Used By Himal

Made with ❤️ and JavaScript!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.