@quick.eco/mysql

1.0.2 • Public • Published

Quick.eco MySQL Manager

MySQL Manager for Quick.eco

Quick.Eco

Example

const { EconomyManager } = require('quick.eco');
const { Client } = require('discord.js');
const client = new Client();
const eco = new EconomyManager({
    adapter: 'mysql',
    adapterOptions: {
        user: 'root',
        password: '',
        host: 'localhost',
        database: ''
    }    
});
 
client.on('ready', () => console.log('connected'));
 
client.on('message', (message) => {
    if(message.author.bot) return;
    if(!message.guild) return;
 
    if(message.content === '!bal') {
        let money = eco.fetchMoney(message.author.id);
        return message.channel.send(`${message.author} has ${money} coins.`);
    }
})

Adapter Options

  • User - MySQL Username
  • Password - Password
  • Host - MySQL Host
  • Database - Database Name
  • Port - Port
  • Table - Table name
  • additionalOptions - Additional Options to pass into MySQL

Links

© Snowflake Studio ❄️ - 2020

Readme

Keywords

none

Package Sidebar

Install

npm i @quick.eco/mysql

Weekly Downloads

1

Version

1.0.2

License

Apache License 2.0

Unpacked Size

8.89 kB

Total Files

4

Last publish

Collaborators

  • zsaif
  • snowflake7