├── Vanilla ├── package.json ├── config.json └── index.js ├── The Altening ├── package.json ├── config.json └── index.js └── README.md /Vanilla/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "discord.js": "^13.8.0", 4 | "mineflayer": "^4.3.0" 5 | } 6 | } -------------------------------------------------------------------------------- /The Altening/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "discord.js": "^13.8.0", 4 | "mineflayer": "^4.3.0" 5 | } 6 | } -------------------------------------------------------------------------------- /The Altening/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "server": { 3 | "host": "minehut.com", 4 | "port": 25565 5 | }, 6 | "minecraft": { 7 | "username": ["LIST OF ACCOUNTS", "THIS LIST CAN BE ONLY 1 OR INFINITY ACCOUNTS LONG", "REMEMBER THE MORE ACCOUNTS U HAVE THE MORE BLATANT IT WILL BECAUSE A LOT OF ACCS WILL LOG FROM THE SAME IP"], 8 | "serverName": "SERVER_NAME", 9 | "adMessage": "&ejoin for fun &cKITPVP &bwith &aRANDOM &aKITS &8(&dNEED STAFF!&8)", 10 | "cooldown": "AMOUNT OF SECONDS BETWEEN EACH ADVERTISE (IN MOST OF CASES THE DEFAULT VALUE OF NON RANK)", 11 | "waitBeforeLogging": "AMOUNT OF SECONDS BETWEEN EACH BOT LOGIN (I RECOMMEND U PUTTING AT LEAST 5)" 12 | }, 13 | "discord": { 14 | "token": "TOKEN", 15 | "channel": "CHANNEL", 16 | "userId": "USER", 17 | "customMessage": false 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Vanilla/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "server": { 3 | "host": "minehut.com", 4 | "port": 25565 5 | }, 6 | "minecraft": { 7 | "username": ["LIST OF ACCOUNTS", "THIS LIST CAN BE ONLY 1 OR INFINITY ACCOUNTS LONG", "REMEMBER THE MORE ACCOUNTS U HAVE THE MORE BLATANT IT WILL BECAUSE A LOT OF ACCS WILL LOG FROM THE SAME IP"], 8 | "password": ["PASSWORD", "SAME AS ABOVE"], 9 | "auth": ["microsoft", "SAME AS ABOVE"], 10 | "serverName": "SERVER_NAME", 11 | "adMessage": "&ejoin for fun &cKITPVP &bwith &aRANDOM &aKITS &8(&dNEED STAFF!&8)", 12 | "cooldown": "AMOUNT OF SECONDS BETWEEN EACH ADVERTISE (IN MOST OF CASES THE DEFAULT VALUE OF NON RANK)", 13 | "waitBeforeLogging": "AMOUNT OF SECONDS BETWEEN EACH BOT LOGIN (I RECOMMEND U PUTTING AT LEAST 5)" 14 | }, 15 | "discord": { 16 | "token": "TOKEN", 17 | "channel": "CHANNEL", 18 | "userId": "USER", 19 | "customMessage": false 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /Vanilla/index.js: -------------------------------------------------------------------------------- 1 | const mineflayer = require('mineflayer'); 2 | const config = require('./config.json'); 3 | const { Client, Intents } = require("discord.js"); 4 | const client = new Client({intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES]}); 5 | 6 | const bot = mineflayer.createBot({ 7 | host: config.server.host, 8 | port: config.server.port, 9 | username: config.minecraft.username, 10 | password: config.minecraft.password, 11 | auth: config.minecraft.auth, 12 | version: false 13 | }) 14 | 15 | bot.on('login', () => { 16 | setInterval(() => { 17 | bot.chat(`/ad ${config.minecraft.serverName} ${config.minecraft.adMessage}`) 18 | console.log(`/ad ${config.minecraft.serverName} ${config.minecraft.adMessage}`) 19 | if (config.discord.customMessage) { 20 | client.channels.cache.get(config.discord.channel).send(`<@${config.discord.userId}> ${bot.username} advertised ${config.minecraft.serverName}`) 21 | } 22 | }, config.minecraft.cooldown); 23 | }) 24 | 25 | client.on("ready", () => {console.log('Discord > Client ready, logged in as ' + client.user.tag);}); 26 | bot.on('kicked', (reason, loggedIn) => console.log(reason, loggedIn)) 27 | bot.on('spawn', () => console.log('Minecraft > Client ready, logged in as ' + bot.username)) 28 | 29 | client.login(config.discord.token); 30 | -------------------------------------------------------------------------------- /The Altening/index.js: -------------------------------------------------------------------------------- 1 | const mineflayer = require('mineflayer'); 2 | const config = require('./config.json'); 3 | const { Client, Intents } = require("discord.js"); 4 | const client = new Client({intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES]}); 5 | 6 | const bot = mineflayer.createBot({ 7 | authServer: 'http://authserver.thealtening.com', 8 | sessionServer: 'http://sessionserver.thealtening.com', 9 | host: config.server.host, 10 | port: config.server.port, 11 | username: config.minecraft.username, 12 | password: 'DuckySoLucky' 13 | }) 14 | 15 | bot.on('login', () => { 16 | setInterval(() => { 17 | bot.chat(`/ad ${config.minecraft.serverName} ${config.minecraft.adMessage}`) 18 | console.log(`/ad ${config.minecraft.serverName} ${config.minecraft.adMessage}`) 19 | if (config.discord.customMessage) { 20 | client.channels.cache.get(config.discord.channel).send(`<@${config.discord.userId}> ${bot.username} advertised ${config.minecraft.serverName}`) 21 | } 22 | }, config.minecraft.cooldown); 23 | }) 24 | 25 | client.on("ready", () => {console.log('Discord > Client ready, logged in as ' + client.user.tag);}); 26 | bot.on('kicked', (reason, loggedIn) => console.log(reason, loggedIn)) 27 | bot.on('spawn', () => console.log('Minecraft > Client ready, logged in as ' + bot.username)) 28 | 29 | client.login(config.discord.token); 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Minehut Advertising Bot 2 | Ability to advertise your minecraft Minehut server. The application utilizes Discord.js for communicating with Discord, and Mineflayer for communicating with Minehut. 3 | > WARNING! Abusing this bot to advertise your Minecraft Bot is against Minehut rules. I do not promote any kind of usage of this bot for breaking rules. 4 | > WARNING! It is not my fault if you get banned/punished. Use it at your own risk! 5 | 6 | ### How does it work? 7 | - There is minecraft bot which is sitting in Minehut lobby 8 | - Every X seconds it sends advertising message 9 | - Notifies specified on discord (opinional) 10 | 11 | ### Configuration 12 | 13 | #### Server 14 | 15 | The server is the server the Minecraft client should connect to, by default it will point to Hypixels server so it can be left as-is if the plan is to use the app for Hypixel guild chat, if not then the `host` is the servers IP or hostname, and the `port` is the port the server is running on. 16 | 17 | > Note: The server name must be lowercase. 18 | > Note: The port must be a number, Mineflayer expects an integer so you can't wrap the port in quotes or Mineflayer won't create a connection to the Minecraft server. 19 | 20 | #### Minecraft 21 | 22 | The minecraft section includes a `username` and `password` option, if using a Mojang account these should be filled out with your Mojang username and password for the Minecraft account you plan on using, your Minecraft username is most likely the email it was created with. If using with a microsoft account change `accountType` to `microsoft`, `username` and `password` are not required and will be left blank as you will be directed to the [Microsoft Link page](https://www.microsoft.com/link). The name of minehut server you would like to advertise should be `serverName`. `adMessage` is custom message which will be next to server name when advertising. `cooldown` is amount of seconds between advertisements. 23 | 24 | #### Discord 25 | 26 | The Discord options includes the `token`, `channel`, `userId` and `customMessage` options. 27 | 28 | The token is the Discord application token, if you don't already have a Discord App, you can [create a new app](https://discordapp.com/developers), then convert the app to a Discord bot, and then get your Discord bot token on the "Bot" page. 29 | 30 | The Discord channel is the ID of the text channel the bot should be linked with, the bot will only send and listen to messages in the channel defined in the config. 31 | 32 | The userID is the ID of the user who should get pinged when bot advertises. This is optional and can be toggled by making `customMessage` false 33 | --------------------------------------------------------------------------------