Simple FragBot Library for Hypixel SkyBlock.
Put any suggestions in the Issues
tab!
- node.js
- npm
- second minecraft account (can be alt)
- Your bot account should either not have dungeons unlocked or be in Limbo (AFK for long enough).
- In the config.json file, you can set the username to whatever you like. This value is only used for sending webhook notifications and logging purposes.
To install the necessary modules for the fragbot, you need to run the install.bat
file. This will initiate the installation process using npm
, and you should wait until it finishes installing all the modules.
To set up the fragbot, you need to open the config.json file and update the email and password. If you haven't moved your account to Microsoft, change "auth": "microsoft" to "auth":"mojang".
For the webhook field, put the link to your Discord webhook where you want the notifications to go. If you don't want to receive notifications via webhook, set webhook to null, without the quotation marks.
After you've made these changes, your config.json file should look something like this.
NOTE: As of version 1.1, blacklisted
field was changed into whitelist
and so changed its behavior. If it's empty (like in the example), the whitelist is turned off
. If it has 1 or more items (example: "whitelist": ["player1","player2"]
) it will be on.
{
"username": "FragBot",
"email": "example@gmail.com",
"password": "P4$$w0rd",
"auth": "microsoft",
"webhook": "https://discord.com/api/webhooks/XXXXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"whitelist": []
}
Now that everything is set up, run the bot using start.bat file
If for whatever reason the start file doesn't work for you, start the bot by running index.js
config.json:
{"email": "example@mail.com","password": "exampleP4SSword"}
node.js:
new (require("./fragbot"))(require("./config.json"));
const FragBot = require("./fragbot");
const config = require("./config.json");
let bot = new FragBot(config);
bot.setMessage("join", "Successfully connected to the server as %s")
bot.setMessage("end", "%s was kicked from the server")
/*
First argument can be:
- join, when fragbot joins the server
- end, when fragbot gets kicked
- invite, when fragbot gets invited to the party
- joined, when fragbot joins the party
- disband, when fragbot disbands the party (user didn't join the dungeons)
- dungeons, when user joins the dungeons
- disbanded, when user disbands the party
- limbo, when fragbot gets sent to the limbo
*/
const FragBot = require("./fragbot");
const config = require("./config.json");
let bot = new FragBot(config);
bot.once("join",()=>{
// FragBot joined the server
})
bot.once("end",()=>{
// FragBot got kicked
})
bot.once("limbo",()=>{
// FragBot was sent to the limbo
})
bot.on("queued",(username,position)=>{
// username partied the fragbot
})
bot.on("dungeons",(username)=>{
// username joined the dungeons
})
bot.on("disbanded",(username)=>{
// username disbanded the party
// to add him to the blacklist do
// bot.config.blacklisted.push(username);
})
const FragBot = require("./fragbot");
const config = require("./config.json");
let logs = [];
let bot = new FragBot(config);
function log(message)
{
logs.push(message)
console.log("["+new Date().toLocaleTimeString()+"] "+message)
}
bot.log = log
const Discord = require('discord.js');
const client = new Discord.Client();
const FragBot = require("./fragbot");
const config = require("./config.json");
let fb = null;
client.on('message', msg => {
if (msg.content === '.start') {
if(fb != null) return;
fb = new FragBot();
msg.channel.send("FragBot has been started")
fb.once("join",()=>{msg.channel.send(fb.username+" connected to hypixel")})
fb.once("end",()=>{msg.channel.send(fb.username+" was kicked from hypixel");fb = null;})
fb.once("limbo",()=>{msg.channel.send(fb.username+" was sent to limbo")});
// cba to continue but you get the point
}
});
client.login('token')
minecraft-protocol
node-fetch@2.6.5