Wrapper for Prismalytics, interfacing with discord.js
Install prismalytics with npm:
npm install prismajs
-
Create an account / login at https://prismalytics.herokuapp.com and register a new bot.
-
Copy its token
-
Initialize the connection with our library like this:
const Prismalytics = require("prismajs");
analytics = new Prismalytics("<Prismalytics Token>");
- Call
analytics.send(message)
whenever your bot registers a command. For example:
bot.on("message", (message) => {
if (message.content.startsWith("<BOT PREFIX HERE>")) {
analytics.send(message);
}
})
This will send the data to our API through the library and you'll have a beautiful dashboard like this: