SkillAgentSearch skills...

Listenmoe.js

NodeJS wrapper for the listen.moe WebSocket

Install / Use

/learn @TheAkio/Listenmoe.js
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

ListenMoe.js NPM version

A NodeJS wrapper for the listen.moe WebSocket.

Installing

npm install listenmoe.js

How to use

const ListenMoeJS = require('listenmoe.js');

// For the jpop WebSocket you can also leave the parameters empty
const moe = new ListenMoeJS('jpop'); // or "kpop" if you want the trackdata from there

moe.on('updateTrack', (data) => { // When listen.moe updates the track
    // Do something with it
});

moe.on('error', (error) => { // Handle any thrown errors
    // Handle it or ignore
});

moe.connect(); // Connect to the WebSocket

moe.getCurrentTrack() // Returns the current track (or null if there is none)

moe.fetchTrack() // Send a track update request to receive the newest data
.then(t => {
    // Do something with it
}).catch(e => {
    // Handle it or ignore
}):

Links

GitHub repository

NPM package

License

Refer to the LICENSE file.

View on GitHub
GitHub Stars7
CategoryDevelopment
Updated6y ago
Forks0

Languages

JavaScript

Security Score

70/100

Audited on Feb 21, 2020

No findings