Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "dbots.js", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "author": "Jdevdisc <69683068+JDevelo@users.noreply.github.com>", |
@@ -34,1 +34,45 @@ ## NOT DONE | ||
## Packs In TS | ||
```typescript | ||
import { dbotsPacks } from 'dbots.js' | ||
const dbots: dbotsPacks = new dbotsPacks({ | ||
key: "KEYYYYYYYY", | ||
botid: "298423749082374" | ||
}) | ||
dbots.getAllPacks() | ||
``` | ||
## Stats In TS | ||
```typescript | ||
import { dbotsStats } from 'dbots.js' | ||
const dbots: dbotsStats = new dbotsStats({ | ||
key: "KEYYYYYYYY", | ||
botid: "298423749082374" | ||
}) | ||
dbots.postStats('1,000') | ||
``` | ||
## Packs Documentation | ||
`.getPack('Best-Bots')` | ||
This will allow you to check out packs on dbots. | ||
`.getAllPacks()` | ||
This will get all packs. | ||
`VotePack('Best-Bots')` | ||
This will allow you to vote packs. | ||
## Stats Documentation | ||
`postStats('1,0000')` | ||
This will post your bot stats. | ||
`getLog()` | ||
This will get the audit logs of your bot. |
@@ -46,7 +46,7 @@ export default class dbotsStats { | ||
} | ||
async getLog(botid?: string) { | ||
async getLog() { | ||
if(!this.key) throw new ReferenceError('You need to provide your api key.') | ||
if(this.botid) throw new ReferenceError('You need to provide your bot id.') | ||
if(!botid) throw new ReferenceError('You need to provide the bot id.') | ||
this.fetch(`https://dbots.co/api/v1/bots/${botid}/log`, { | ||
if(!this.botid) throw new ReferenceError('You need to provide the bot id.') | ||
this.fetch(`https://dbots.co/api/v1/bots/${this.botid}/log`, { | ||
method: 'POST', | ||
@@ -53,0 +53,0 @@ headers: { |
17217
78