Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Commit

Permalink
README fix
Browse files Browse the repository at this point in the history
  • Loading branch information
iREDMe committed Oct 12, 2018
1 parent b97cb3f commit ffdb504
Showing 1 changed file with 35 additions and 16 deletions.
51 changes: 35 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
# botlist.space - Alternate Package

[![NPM](https://nodei.co/npm/simple.space.png)](https://nodei.co/npm/simple.space/)

A simplified alternative package to [the official](https://www.npmjs.com/package/botlist.space). :)

To install, use ``npm i simple.space``; But you already know that, right?

## What sets the difference than the original?

* Servers are named "Guilds"
* Functions are typically easier to remember.

## Examples

Wait, before we get in, let me explain things.
Expand All @@ -27,10 +34,16 @@ const SimpleSpace = require('simple.space');
// log (?Boolean) => Whether or not to log any POST actions. Recommended value is false. Useful if you want to know whenever something happens I guess?
const Example = new SimpleSpace(token = 'none', botID = 'none', ?client = false, ?log = false); // Example varies

// Post your server count onto the site.
// serverSize (?Number) => The number OR array (for shards) provided. If you provide a client object on initialization, this is not needed. Providing a value overrides the autofill.
Example.setCount(?serverSize);
Example.setCount(10); // A message, code, and whether or not it succeeded.
// Fetches the site statistics.
// specified (?String) => The specific value to receive.
Example.fetchStats(?specified);
Example.fetchStats(); // Example varies
Example.fetchStats('users'); // Example varies

// Post your guild count onto the site.
// guildSize (?Number) => The number OR array (for shards) provided. If you provide a client object on initialization, this is not needed. Providing a value overrides the autofill.
Example.setGuilds(?guildSize);
Example.setGuilds(10); // A message, code, and whether or not it succeeded.

// Fetch a bot from the site.
// botID (String) => The bot ID to fetch from the site.
Expand All @@ -39,24 +52,25 @@ Example.fetchBot(botID, ?specified);
Example.fetchBot('463803888072523797'); // Example too large to show.
Example.fetchBot('463803888072523797', 'username'); // Moddy ©

// Fetch every bot that had been logged onto the site.
// kind (String) => To get either "bots" or "guilds" (supply "servers")
// specified (?String) The specific value to receive.
Example.fetchAll(kind, ?specified);
Example.fetchAll('servers'); // Example too large to show.
Example.fetchAll('bots', 'prefix'); // ['!', '.', '$', ...a lot more];

// Fetches the bot by using the ID supplied during initialization.
// specified (?String) => The specific value to receive.
Example.fetchSelf(?specified);
Example.fetchSelf(); // Example varies
Example.fetchSelf('username'); // Example varies

// Fetches the site statistics.
// specified (?String) => The specific value to receive.
Example.fetchStats(?specified);
Example.fetchStats(); // Example varies
Example.fetchStats('users'); // Example varies

// Fetch a user that has logged onto the site.
// userID (String) => The user ID to fetch.
// specified (?String) => The specific value to receive.
Example.fetchUser(userID, ?specified);
Example.fetchUser('235593018332282884'); // Example too large to show
Example.fetchUser('235593018332282884', 'username') // iRED
Example.fetchUser('235593018332282884', 'username'); // iRED

// Fetch a bot's upvotes in the past 24 hours.
// botID (String) => The bot ID to fetch upvotes from.
Expand All @@ -70,14 +84,22 @@ Example.fetchUpvotes('463803888072523797', true); // Example varies
Example.fetchUpvotesSelf(?ids = false);
Example.fetchUpvotesSelf(); // Example varies
Example.fetchUpvotesSelf(true); // Example varies

// Edit a key-value pair in the instance.
// key (String) The key value to change, etc. 'token', 'botID', 'client', 'log'
// value (*) The value to change the key into.
Example.edit(key, value);
Example.edit('token', 'xxx'); // { 'token': 'xxx', ... };
Example.edit('client', 'none'); // { 'client': false, ...};
```
## Update Notes Section
### v1 Section
### v2 Section
Releases will now be on the github page/releases! You can get notified by joining [my main server](https://discord.gg/eB3gK72)!
### v1 Section
#### v1.0.6
* Introduced three new functions (read them in the examples):
1. ``fetchUser(userID, ?specified);``
2. ``fetchUpvotes(botID, ?ids);``
Expand All @@ -89,15 +111,12 @@ __Minor Update Notes__
* Updated the examples and an explanation as to how the comments work.
#### v1.0.4
* Fixed the fetchBot() function.
#### v1.0.3
* Updated values, specifically ``token`` and ``botID`` if you supply ``'none'``; It will turn into false.
#### v1.0.1
* First things. Lol.
* Thing here.
* Thing there.

0 comments on commit ffdb504

Please sign in to comment.