50.2.0 • Published 3 months ago

anarchy-bots v50.2.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 months ago

Overview

anarchy-bot is a framework that allows you to make bots inside Minecraft anarchy servers!

Features

  • Interaction creator: A function that lets you make interactions for the bot

  • Built-in chat parser: A built-in plugin that parsers chat messages for you

Examples

Here is an example code for you:

const {
    anarchyBotCreator,
    anarchyBotInteractionCreator
} = require('anarchy-bots');

const anarchyBot = anarchyBotCreator.createAnarchyBot({
    targetHostname: 'localhost',
    targetPort: 25565,
    botUsername: 'Bot',
    botVersion: '1.18.2',
    commandPrefix: '!'
});

anarchyBot.on('signingIn', information => {
    console.log(`Signing in to '${information.targetHostname}:${information.targetPort}'...`);
});

anarchyBot.on('signedIn', information => {
    console.log(`Signed in to '${information.targetHostname}:${information.targetPort}'!`);
});

anarchyBot.on('signedOut', information => {
    console.log(`Signed out from '${information.targetHostname}:${information.targetPort}' due to: ${information.dueTo}`);
});

anarchyBotInteractionCreator.createInteraction(
    anarchyBot,

    {
        type: 'command',
        name: 'ping',

        execute (commandHandler) {
            commandHandler.anarchyBot.anarchyClient.write('chat', { message: 'Pong!' });
        }
    }
);

anarchyBotCreator.signInAs(anarchyBot);
50.1.5

3 months ago

50.2.0

3 months ago

50.1.0

3 months ago

50.0.5

3 months ago

0.0.1

3 months ago