discord-exp-mysql

1.1.2 • Public • Published

discord-exp-mysql

A module using discord.js and canvas that allows you to easily make an experience system for your discord bot. Background details relevant to understanding what this module does

Node.js discord

Links

Usage

Don't forget to modify config.json with your auth mysql(The file is in module)

var expdiscord = require('discord-exp')

client.on('messageCreate', (message) => {
    if (message.author.id === client.user.id || message.author.bot || message.author.equals(client.user)) return;

    let id = message.author.id;

    expdiscord.verify(id)
    if (message.content == "*exp") {
        console.log("Commande exp")

        expdiscord.getexp(id).then(function (result) {

                const embed = {
                    color: 0x0099ff,
                    author: {
                        name: client.user.username,
                        icon_url: client.user.avatarURL()
                    },
                    title: `**Vous avez :**`,
                    description: `${result} exp`,
                    timestamp: new Date(),
                    footer: {
                        icon_url: client.user.avatarURL(),
                        text: `©ToniPortal`
                    }
                }
               
                return message.channel.send({ embeds: [embed] })

            
        }).catch(function (err) {
            console.log(err, err.stack);
        });

    }

})

outputs

Does

Install

With npm installed, run

$ npm install discord-exp

Built With

Future Updates

  • [] A cancas System.

Author

ToniPortal

🤝 Support

Feature requests are welcome!

Give a ⭐️ if you like this project !

Badges

MIT License

Package Sidebar

Install

npm i discord-exp-mysql

Weekly Downloads

0

Version

1.1.2

License

MIT

Unpacked Size

21.6 kB

Total Files

7

Last publish

Collaborators

  • toniportal