discord-levels
v1.1.0
Published
A package that allows you to create a complete level system on your discord bot
Downloads
19
Maintainers
Readme
DISCORD LEVELS
This easy-to-use package allows you to make a complete and modern experience and levels system on your server
Installation
Enter the following command to install the package, and to use it later:
npm install --save discord-levels
Documentation
You will find the complete documentation here
Example of use
const { Client } = require('discord.js');
const Levels = require('discord-levels');
const client = new Client();
const settings = {
token: "YOUR_DISCORD_BOT_TOKEN",
prefix: "!" // You can change it
};
client.on('ready', () => console.log("Connected!"));
client.on('message', async (message) => {
if(!message.content.startsWith(settings.prefix)) return;
if(message.author.bot || !message.guild) return;
if(message.content === settings.prefix + "give") {
await Levels.addXP(message, message.author.id, 5) // Will add 5 XPs to the author of the message
} else if(message.content === settings.prefix + "remove") {
await Levels.removeXP(message, message.author.id, 5) // Will remove 5 XPs to the author of the message
} else if(message.content.startsWith(settings.prefix + "user")) {
let userID = message.content.split(/ +/g)[1];
await Levels.fetch(message, userID);
} else if(message.content === settings.prefix + "leaderboard") {
await Levels.leaderboard(client, message);
} else if(message.content === settings.prefix + "rank") {
await Levels.Rankcard(message, message.author.id);
};
});
client.login(settings.token);
Contributing
If you have any bug, feell free to open an issue here
Questions
Any question should be asked on the available support server here
Author
- Name:
Lucas D.
- A.K.A Oϲτανια#5573 (
638474353842978816
) - GitHub: Click here