Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/disbotsxyz/disbots-api
A official api disbots
https://github.com/disbotsxyz/disbots-api
bot discord discord-bot discord-js npm
Last synced: about 1 month ago
JSON representation
A official api disbots
- Host: GitHub
- URL: https://github.com/disbotsxyz/disbots-api
- Owner: Disbotsxyz
- License: mit
- Created: 2021-07-15T12:50:34.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-10-07T15:52:02.000Z (about 3 years ago)
- Last Synced: 2023-12-19T17:13:13.883Z (11 months ago)
- Topics: bot, discord, discord-bot, discord-js, npm
- Language: JavaScript
- Homepage: https://disbots.xyz
- Size: 10.7 KB
- Stars: 3
- Watchers: 1
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**NPM:** [npmjs.com/package/disbots-xyz](https://www.npmjs.com/package/disbots-xyz/)
## Installation
*If you have trouble with the installation, please feel free to visit our [discord](https://discord.gg/m5vUJVztpt) address.*
- `npm i disbots-xyz`#### 1. Where can I get DisBots.xyz api?
Ans: [JavaScript](https://www.npmjs.com/package/disbots-xyz)
[Python](https://pypi.org/project/disbots.py/)#### 2. How do I install it?
Ans: JavaSciprt: npm i disbots-xyz or npm install disbots-xyz
Python: pip install disbots#### 3. Does it have any GitHub Repository?
Ans: Yes It Is [Here](https://github.com/disbotsxyz/disbots-api)#### 4. What is it's uses?
Ans: To get the daily vote count, server count and information about your bot.
Examples: avatar, botID, discriminator, shortDescription, prefix, votes, serverCount, ownerID, owner, co-owners, tags, longDescription, certificate etc.#### 5. How can I get my bot's server count?
`Ans: JavaScript:`
```js
const disbots = require("disbots-xyz");
const dbl = new disbots("TOKEN-HERE", client);client.on("ready", async () => {
dbl.serverCount();
console.log("Server count posted")```
### Python:
```py
from disbots import disbots
from discord.ext import commands, tasksclient = commands.Bot(command_prefix="!")
dbl = disbots(client,"token of disbots")@tasks.loop(minutes = 10)
async def postservercount():
await dbl.serverCountPost()@client.event
async def on_ready():
postservercount.start()client.run("token")
```
#### 6. How can I get my bot's vote count?
`Ans:`
```js
let hasVote = await dbl.hasVoted("Your-bot-id");
if(hasVote === true) {
console.log("Voted")
} else {
console.log("Vote please.")
}
let search = await dbl.search("Your-bot-id")
console.log(search)```
#### 7. Full Example?
`Ans:`
```js
const disbots = require("disbots-xyz");
const dbl = new disbots("TOKEN-HERE", client);client.on("ready", async () => {
dbl.serverCount();
console.log("Server count posted")
let hasVote = await dbl.hasVoted("your-bot-id");
if(hasVote === true) {
console.log("Voted")
} else {
console.log("Vote please.")
}
let search = await dbl.search("Your-bot-id")
console.log(search)/* SearchResults
{
avatar: '',
botID: '',
username: '',
discrim: '',
shortDesc: '',
prefix: '? [changable]',
votes: 25,
ownerID: '',
owner: '',
coowners: [ '' ],
tags: [ 'Moderation', 'NSFW', 'Music' ],
longDesc: longDesc,
certificate: 'Certified'
}
*/
});```
# Questions?
Come talk to us here:[![Disbots.xyz](https://discord.com/api/guilds/852825880271257611/embed.png?style=banner1)](https://discord.gg/YhTU6Akzmy)