A simple API wrapper for botsfordiscord.com written in Python.
Project description
Warning: bfd.py has been deprecated
Please consider using discordlists.py instead which is also available on PyPi.
bfd.py
A simple API wrapper for botsfordiscord.com written in Python.
Installation
Install via pip (recommended)
pip install bfd.py
Features
- POST server count
- AUTOMATIC server count updating
- GET bot info
- GET global bot list
- GET bot list for a specific user
- GET widgets url
- SEARCH for bots
Example Discord.py Rewrite cog
import bfd
import discord
from discord.ext import commands
class BotsForDiscord:
def __init__(self, bot):
self.bot = bot
self.token = 'token' # set this to your BFD token
self.bfd = bfd.Client(self.bot, self.token) # Create a Client instance
self.bfd.start_loop() # Posts the server count every 30 minutes
@commands.command()
async def botinfo(self, ctx, bot: discord.User): # unfiltered botinfo demo
info = await self.bfd.get_bot(bot.id)
if info is None:
await ctx.send("Can't find this bot on BFD")
return
embed = discord.Embed(title="BotInfo")
for key, value in info.as_dict().items():
if key == "" or value == "":
continue
embed.add_field(name=key, value=str(value))
await ctx.send(embed=embed)
def setup(bot):
bot.add_cog(BotsForDiscord(bot))
Discussion, Support and Issues
For general support and discussion of this project, please join the Discord server: https://discord.gg/qyXqA7y
To check known bugs and see planned changes and features for this project, please see the GitHub issues.
Found a bug we don't already have an issue for? Please report it in a new GitHub issue with as much detail as you can!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file bfd.py-1.0.2.tar.gz
.
File metadata
- Download URL: bfd.py-1.0.2.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0edfc150c9cead57d5baff15e00c0383ea5cc50e4971bd3a2eb94853144b1062 |
|
MD5 | 330dd9a213feff362345c88363b57d28 |
|
BLAKE2b-256 | 8dee598bb873495f00ba3d9e7827c154fa4afacb71fbef55b53656137bed919f |
File details
Details for the file bfd.py-1.0.2-py3.6.egg
.
File metadata
- Download URL: bfd.py-1.0.2-py3.6.egg
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22249755b80f56f1d8b42973a71de5cc26bba5b2009cea04276e8682970ca070 |
|
MD5 | 2a1bd311f46fd392e81c6d8746dc9b6b |
|
BLAKE2b-256 | 71c4468d4b2113390e856afc164b21d019efd220bb3195b00ad2a0b558b50533 |
File details
Details for the file bfd.py-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: bfd.py-1.0.2-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93cc5a2de8ca541d1b0af0a5b916ded38838ac89544cb1ff4e9b964eb7ad33b2 |
|
MD5 | 09f38e39826cb391dc6a0b864a96405c |
|
BLAKE2b-256 | 335607c40c69c94945bb0cd6cc3fe45398cc5b9a2f1b60220e4c54cbc8f6b56e |