mppclone-client
v1.1.3
Published
MPPClone client
Downloads
31
Readme
mppclone-client
This module is a fork of the MPP client with token-based authentication. This module is only meant for MPPClone, but it will work on any MPP site that uses token-based authentication in the same way as MPPClone.
This module is not officially affiliated with MPPClone.
Usage
It is strongly recommended that you keep your tokens in a safe place where nobody else can access them.
# .env
TOKEN=your token here
// index.js
// Load environment variables into process.env
require('dotenv').config();
const Client = require('mppclone-client');
let cl = new Client("wss://mppclone.com:8443", process.env.TOKEN);
cl.start();
cl.setChannel('test/awkward');
cl.on('a', msg => {
if (msg.a == "!ping") {
cl.sendArray([{
m: "a",
message: "Pong!"
}]);
}
});