Coder Social home page Coder Social logo

dxxxxy / dreambot Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 3.0 211 KB

An open-source hypixel skyblock bot with extensive documentation, the latest dependencies and almost no hardcoding. Featuring simple, clean yet elegant embed messages with custom emojis and database integration.

JavaScript 99.95% Procfile 0.05%
discord bot hypixel skyblock skills pets xp profile

dreambot's Introduction

DreamBot

Setup | Commands | How it works | Credits

Recode Completed (v2). For the v1, visit DreamBot/legacy

An open-source hypixel skyblock bot with extensive documentation, the latest dependencies and almost no hardcoding. Featuring simple, clean yet elegant embed messages with custom emojis and database integration.

Setup

  1. Clone repo
  2. Create a .env file following this template:
TOKEN= # discord client token 
PREFIX= # bot command prefix
APIKEY= # hypixel api key
DATABASE= # mongodb url
  1. npm i - Installs dependencies
  2. node . - Runs bot

Congrats, you made it.

Commands

Please take note that [] means required while <> means optional (arguments)

  • d!help - Shows all commands.
  • d!register [IGN] - Register your name so that subsequent commands don"t need your name.
  • d!timers - Shows timers for events

The following commands will display a players stat if given a name. If no name is given and you are registered, you will be displayed your own stats.

  • d!skills <IGN> - Shows skills
  • d!pets <IGN> - Shows pets
  • d!slayers <IGN> - Shows slayers
  • d!info <IGN> - Shows basic info

How it works

  • For command binding: A command is registered by reading its file name and creating a "copy" of its run function (exports.run).

  • For alias binding: An alias is registered by reading the first line of the file and seeing if it has a comment (//). It will then parse that command and whatever text written shall be registered as an alias that can be called like a command.

As an example: imagine a file named help.js in the commands/ directory. The content of that file is:

//h
exports.run = (client, message, args) => {
    message.channel.send("help")
}

Two commands will be registered, h and help prefixed with whatever the value of process.env.TOKEN is.

  • For event binding: An event is registered by reading its file name and exporting it with module.exports.

As an example: imagine a file named ready.js in the events/ directory. The content of that file is:

module.exports = (client) => {
    console.log(`Logged in as ${client.user.tag}`)
}
+ As a plus, we get to access `client`, `message` and `args` without 
+ having to import them. 

+ And, as we already have an enclosing function, we can simply prefix the  
+ arguments with async instead of creating a self executing anonymous function.

- As a minus, commands and events are REQUIRED to be in `commands/` 
- and `events/` respectively and their names will need to adhere to discord.js.

A list of events can be found here: https://discord.js.org/#/docs/main/stable/class/Client

Credits

dreambot's People

Contributors

dependabot[bot] avatar dxxxxy avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

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.