README
Discord XP
Advantages of using it:
- Unlimited servers
- Default prefix
- Super fast
- 100% Reliable
- Fast Support
Note: All data is reliably stored in an sqlite database.
Installation
npm i discord-xpp
Basic use of it
const Discord = require('discord.js');
const client = new Discord.Client();
const xp = require('discord-xpp');
client.on('message' (message) => {
// Start the process
xp.start(message.author.id)
// Define prefix
let prefix = '!';
//rest of the message event
let args = message.content.slice(prefix.length).split(' ');
if (!message.content.startsWith(prefix)) return;
if (args[0].toLowerCase() === 'xp') {
let cxp = xp.fetch.amount(message.author.id)
message.channel.send(`Your current xp is: ${cxp}!`)
}
if (args[0].toLowerCase() === 'lvl') {
let clvl = xp.fetch.level(message.author.id)
message.channel.send(`Your current level is: ${clvl}!`)
};
});
client.login('token');
Methods
start
A necessary inside the client.on message function for the bot to work properly!
const xp = require('discord-xpp');
xp.start(message.author.id);
fetch
Fetch is divided into two AMOUNT and LEVEL!
const xp = require('discord-xpp');
xp.fetch.amount(message.author.id);
xp.fetch.level(message.author.id);
Help
If you happen to need any help or just want to give us new ideas or advice contact me in lucaaaa#8351