# discloud

> All-purpose discord !! We have created a database-like library by taking advantage of the features of Discord, a chat application. I'm using discord.js.

Latest version **1.5.1** (published 2020-11-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install discloud
pnpm add discloud
yarn add discloud
bun add discloud
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.5.1 |
| Published | 2020-11-17 |
| First published | 2020-11-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 16.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Wada Kohsei |
| Maintainers | meiosis |
| Keywords | discord, db, cloud, data, base, discord, discordjs |

## Links

- npm: https://www.npmjs.com/package/discloud
- npm.io page: https://npm.io/package/discloud

## Dependencies (1)

- [discord.js](https://npm.io/package/discord.js.md) ^12.3.1

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [@temporal-architect/claude-plugin](https://npm.io/package/@temporal-architect/claude-plugin.md) — 335 weekly downloads

## Recent versions

- 1.5.1 (latest) — 2020-11-17

## README

# 1. Why use discloud  :question:  　![©X](https://user-images.githubusercontent.com/69778181/95009940-99174c00-0660-11eb-85a5-8996fe1fafe6.jpg) 

**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:

 - [HOW TO USE](#sample)
 - [INFOMATION](#infomation)
   - [updata](#updata)
   - [operating_environment](#operating-environment)
     - [language](#language)
     - [dependencies](#dependencies)
   - [about defects etc](#about-defects-etc)

# :information_source: 2. How to use
<details><summary>Sample Code</summary><div>

```js
(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
    });
})();
```
</div></details>

# 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 "

---
_Source: https://npm.io/package/discloud · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
