1.5.1 • Published 4 years ago

discloud v1.5.1

Weekly downloads
2
License
MIT
Repository
-
Last release
4 years ago

1. Why use discloud :question:  ©X

If you use discord, you can view it directly without using space to store the data,
so it is easy to manage.
Increased storage / retrieval speed.

:scroll: table of contents :scroll:

:information_source: 2. How to use

(async function(){

    const cloud = require('discloud');
    const DB = new cloud;

    /**
     * How to set when DB is generated
     * -It can also be set using DB.setting()
     */
    const DB = new cloud({
        encode:{//encode settings
            use:true,//encode = on
            key:{
                keyA:"(32 alphanumeric characters)",
                keyB:"(16 alphanumeric characters)"
            }
        },
        token:"Your token is here",
        server:"Your Server ID (This server id's server will be a database)"
    });

    /**
     * How to use encode
     */
    DB.encodOn();//Turn on encoding
    DB.setKey("(32 alphanumeric characters)","(16 alphanumeric characters)");//set key

    const client = await DB.create("Your token is here",{
        server:"Your Server ID (This server id's server will be a database)",
        //DB.setServer("ID");//You can also set this way
        name:"DataTable's name"
    },
    {}//The value to be set first when creating db
    );
    client.on('error',err=>{
        console.log(err.message);//throw client's error here
    })
    client.on('ready',async ()=>{//client ready
        console.log('ready...');

        /**
         * Emphasis is placed on efficiency and safety.
         * The method that directly operates the DB is
         * Only set, get and create are available.
         * Other methods to change settings (such as switching encryption)
         * There is.
         */
        await DB.set("text")//set data in database
        .then(async()=>{
            console.log(await DB.get())
            //text
        }); 
        /**
         * Notify when data set is complete
         */
        client.on('set',data=>{
            data = data[0];//main content (data[1] is this process's key)
            console.log(data.processTime);//Time it took to set
            console.log(data.setData);//Seted data
            console.log(data.info);// = DB.info()
        });
        client.on('get',data=>{
            var info = data[0];
            //main content
            var key = data[1];
            //this process's key
        });
        /**
         * Notify once when nothing is written.
         */
        client.once('writeEnd',async ()=>{
            console.log(await DB.get());
        });

        DB.info();
        //You can get Your DB's infomations
    });
})();

3. INFOMATION

This software is released under the MIT License, see LICENSE.txt.

UPDATA :heavy_plus_sign:

2020:10/10 Significant improvement
2020:10/18 Revised again
2020:11/14 Significant weight reduction
2020:11/17 Fixing a terrible mistake

:white_check_mark: Operating environment

language

Node.js

Dependencies

discord.js

:information_source: I recommend having a server dedicated to this database library.

About defects etc :email:

Contact " Official.neoxbot@gmail.com "

1.5.1

4 years ago

1.5.0

4 years ago

1.1.0

4 years ago

0.7.3

4 years ago

0.7.2

4 years ago

0.7.1

4 years ago

0.6.9

4 years ago

0.6.8

4 years ago

0.7.0

4 years ago

0.6.6

4 years ago

0.6.5

4 years ago

0.6.3

4 years ago

0.6.2

4 years ago

0.6.1

4 years ago

0.4.9

4 years ago

0.4.8

4 years ago

0.4.7

4 years ago

0.4.6

4 years ago

0.6.0

4 years ago

0.4.5

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.5

4 years ago

0.3.4

4 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.9

4 years ago

0.2.7

4 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.3

4 years ago

0.2.4

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.8

4 years ago

0.1.9

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.2

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.5

4 years ago

0.1.0

4 years ago

0.1.1

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.3

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago

1.0.0

4 years ago