Skip to content

peepeestyle/MeowerBot.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MeowerBot.js

Port of MeowerBot.py to Node.js

Installing

npm install meowerbot

Example Bot

import Bot from "meowerbot";

const bot = new Bot("username", "password"); // Init, then login to Meower

bot.onLogin(() => { // Runs when logged in
    bot.post("Hello from MeowerBot.js!");
});

bot.onPost((username, content) => { // Runs when a new post is sent
    if (content.startsWith("!help")) {
        bot.post("Commands: !help");
    }
});

bot.onMessage((data) => { // Runs when the server sends a new message
    console.log(`New message: ${data}`);
});

bot.onClose(() => { // Runs when the bot gets disconnected
    console.log("Disconnected");
});

About

Port of MeowerBot.py to Node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published