# Cloud Discord List

Cloud Discord List is an online platform that lists bots for discord

## Usage

```javascript
var cdl = require("cloud-list") 
var cloud_client = new cdl("Client id","Client Api Token") 
```

## Getting Started

`Client` -  [discord.js](https://discord.js.org)/[Eris](https://www.npmjs.com/package/eris) Client 

### Posting Guild count:

```javascript
cloud_client.post(client)
    /**
>[cloud-list] Guild Count Posted!
    * **/
```


### Auto Post guild count:
> Auto post guild count once every 2 minutes
```javascript
cloud_client.autoPost(client)
    /**
>[cloud-list] Guild Count Posted!
    * **/
```



### Get When user votes for your bot:
```javascript
cloud_client.on("voted", (data) => {
  console.log(data)
    /**
    * data returns: {
      user_votes: 1,
      user_id:463696108766494730,
      user_name:Bruninho,
      user_discriminator:9205,
    * }
    * **/
})
```

### Get bot Stats:
```javascript
cloud_client.getStats(client).then(function(data) {
  console.log(data)
      /**
{ votes: <int>,
  name: '<string>',
  library: '<string>',
  id:<int>,
  prefix: '<string>',
  long_description: '<string>',
  short_description: '<string>',
  month_votes: <int>,
  server_invite: '<string>',
  owner: '<string>',
  website: '<string>',
  other_owners: Array<string>}
    * **/
}).catch(function(err) {
    if(err) return console.log(err)
});
```


### Check If user has Voted:
```javascript
cloud_client.hasVoted("User_id").then(function(data) {
   console.log(data)
         /**
if User Has not voted yet returns: (User has not voted yet)!

if User has voted:

> Returns a Promise that resolves to:
{ id:<String>, 
  vote: <int>}
    * **/
}).catch(function(err) {
   if(err) return console.log(err)
});
```

## Dependencies
* [node-fetch] (https://www.npmjs.com/package/node-fetch) - Used for Https requests
* [Socket.io-client] (https://www.npmjs.com/package/socket.io-client) - Used for Events between server and client requests



## Terms and service

 [TOS](https://www.cloudlist.xyz/tos) for details on our services

## Website

[Cloud List](https://www.cloudlist.xyz/) 

## Authors

* **BruBrunin** - *Library Developer* 
