mirror of
https://github.com/Threnklyn/MinecraftChat.git
synced 2026-05-19 04:43:28 +02:00
Removed test bot
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
process.env.DEBUG = 'bot';
|
||||
process.stdout.write('\033c');
|
||||
console.log('> MineFlayer Initializing');
|
||||
|
||||
var mineflayer = require('mineflayer');
|
||||
var log = require('debug')('bot');
|
||||
|
||||
var bot = mineflayer.createBot({
|
||||
host: 'play.koonkraft.net',
|
||||
port: 25565,
|
||||
username: 'alexth',
|
||||
password: 'alexth123'
|
||||
});
|
||||
|
||||
bot.on('login', function() {
|
||||
bot.chat('/prison');
|
||||
});
|
||||
|
||||
bot.on('message', function(message) {
|
||||
var buffer = '';
|
||||
message.extra.forEach(function(data) {
|
||||
var text = data.text;
|
||||
if (text) {
|
||||
text = text.replace(/§k/ig, '');
|
||||
text = text.replace(/§l/ig, '');
|
||||
buffer += text;
|
||||
}
|
||||
});
|
||||
buffer = buffer.replace(/§([0-9abcdef])([^§]*)/ig, function replace(x, y, z) {
|
||||
return '<span class="color-'+y+'">'+z+'</span>';
|
||||
});
|
||||
process.stdout.write(buffer + '<br>\n');
|
||||
});
|
||||
Reference in New Issue
Block a user