Quick.eco MySQL Manager
MySQL Manager for 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