@quick.eco/mongo
v1.0.4
Published
Mongodb manager for Quick.eco
Downloads
36
Readme
Quick.eco Mongo Manager
Mongo Manager for Quick.eco
Quick Example
const { EconomyManager } = require('quick.eco');
const { Client } = require('discord.js');
const client = new Client();
const eco = new EconomyManager({
adapter: 'mongo'
adapterOptions: {
collection: 'money', // => Collection Name
uri: 'mongodb://localhost/quickeco' // => Mongodb uri
}
});
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
- Collection - Mongodb collection name
- uri - Mongodb URI
- additionalOptions - Additional Options to pass into mongoose
Links
© Snowflake Studio ❄️ - 2020