2.0.3 • Published 6 years ago

gekkou v2.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

Gekkou NPM version

A NodeJS Wikia chat client

Requirements


Installation

Create a directory for your bot and change to that directory in your command line. Use NPM to install Gekkou:

npm install gekkou

Optional libraries

  • eventemitter3 - Alternate EventEmitter library (faster)

Example: Ping Pong

const { Client } = require("gekkou");
const bot = new Client("some_username", "some_password");

bot.on("ready", () => {
    console.log("Ready!"); // logs ready
});

bot.on("messageCreate", (msg) => {
    if (msg.content === "!ping") { // If the message content is "!ping"
        bot.createMessage(msg.room.id, "Pong!");
        // Send a message in the same room with "Pong!"
    } else if (msg.content === "!pong") { // Otherwise, if the message is "!pong"
        bot.createMessage(msg.room.id, "Ping!");
        // Respond with "Ping!"
    }
});

bot.connect("ur.wiki", "ur.other-wiki"); // if u want more sites to connect, pass them as parameters

More examples can be found in the examples folder.

2.0.3

6 years ago

2.0.2

6 years ago

2.0.0

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago