Comparing version
{ | ||
"name": "nyxr", | ||
"version": "1.0.3", | ||
"description": "An API for disxord bots site", | ||
"version": "1.0.4", | ||
"description": "An API for discord bots site", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
@@ -1,12 +0,8 @@ | ||
# dblapi.js | ||
An official module for interacting with the discordbots.org API | ||
# nyxr | ||
An official module for interacting with the discordbots.site API | ||
## Installation | ||
`npm install dblapi.js` | ||
`npm install nyxr` | ||
## Documentation | ||
Documentation can be found [here](https://discordbots.org/api/docs#jslib) | ||
## Example | ||
## NOTE: | ||
- The api is still WIP (work in progress). | ||
### Example of posting server count with supported libraries (Discord.js and Eris) | ||
@@ -16,25 +12,12 @@ ```js | ||
const client = new Discord.Client(); | ||
const DBL = require("dblapi.js"); | ||
const dbl = new DBL('Your discordbots.org token', client); | ||
// Optional events | ||
dbl.on('posted', () => { | ||
const DBS = require("nyxr"); | ||
const dbs = new DBS('Your discordbots.site token', client); | ||
//Optional events | ||
dbs.on('posted', () => { | ||
console.log('Server count posted!'); | ||
}) | ||
dbl.on('error', e => { | ||
dbs.on('error', e => { | ||
console.log(`Oops! ${e}`); | ||
}) | ||
``` | ||
### Example of using webhooks to receive vote updates | ||
```js | ||
const DBL = require('dblapi.js'); | ||
const dbl = new DBL(yourDBLTokenHere, { webhookPort: 5000, webhookAuth: 'password' }); | ||
dbl.webhook.on('ready', hook => { | ||
console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`); | ||
}); | ||
dbl.webhook.on('vote', vote => { | ||
console.log(`User with ID ${vote.user} just voted!`); | ||
}); | ||
``` |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
32459
-1.42%23
-41.03%