Nagging Penguin Matriarchs

    @quick.eco/mongo

    1.0.4 • Public • Published

    Quick.eco Mongo Manager

    Mongo Manager for Quick.eco

    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

    Install

    npm i @quick.eco/mongo

    DownloadsWeekly Downloads

    5

    Version

    1.0.4

    License

    Apache License 2.0

    Unpacked Size

    7.45 kB

    Total Files

    4

    Last publish

    Collaborators

    • zsaif
    • snowflake7