mpp-client-net
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

mpp-client-net

This module is a fork of the MPP client with token-based authentication. This module is only meant for MPP.net, but it will work on any MPP site that uses token-based authentication in the same way as MPP.net.

This module is not officially affiliated with MPP.net.

Usage

It is strongly recommended that you keep your tokens in a safe place where nobody else can access them.

# .env
MPPNET_TOKEN=your token here
// index.js

// Load environment variables into process.env
require('dotenv').config();

const Client = require('mpp-client-net');
let cl = new Client("wss://mppclone.com", process.env.MPPNET_TOKEN);

cl.start();
cl.setChannel('test/awkward');

cl.on('a', msg => {
    if (msg.a == "!ping") {
        cl.sendArray([{
            m: "a",
            message: "Pong!"
        }]);
    }
});

Readme

Keywords

none

Package Sidebar

Install

npm i mpp-client-net

Weekly Downloads

13

Version

1.2.0

License

GPL-3.0-only

Unpacked Size

51.6 kB

Total Files

14

Last publish

Collaborators

  • hri7566