Skip to content

Instantly share code, notes, and snippets.

@ncurran02
Created September 9, 2017 10:43
Show Gist options
  • Save ncurran02/b92f92cd3cb93336aedffd338db02b3a to your computer and use it in GitHub Desktop.
Save ncurran02/b92f92cd3cb93336aedffd338db02b3a to your computer and use it in GitHub Desktop.
const mineflayer = require('mineflayer');
if (process.argv.length < 2 || process.argv.length > 2) {
console.log('Usage : node Focus.js [<name>]');
process.exit(1);
}
const bot = mineflayer.createBot({
host: 'play.totalfreedom.me',
username: process.argv[2] ? process.argv[4] : 'echo',
verbose: true
});
bot.on('chat', (username, message) => {
if (username === bot.username) return;
bot.chat(message);
});
@LiamTownsley
Copy link

teach me how to use it ;-;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment