Skip to main content

A simple API wrapper for botsfordiscord.com written in Python

Project description

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 3 minutes

        @commands.command()
        async def botinfo(self, ctx, bot: discord.User): # unfiltered botinfo, you should not use this, it's shit but it shows the behavior
            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
Discord Server

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bfd.py-1.0.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distributions

bfd.py-1.0.0-py3.6.egg (17.8 kB view details)

Uploaded Source

bfd.py-1.0.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file bfd.py-1.0.0.tar.gz.

File metadata

  • Download URL: bfd.py-1.0.0.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for bfd.py-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b6f8cd185de941686effae8c4f269960d6aed15a29127240adce54b4aee9bcc2
MD5 b74ebe6c85d4982cf30d392ccd57d072
BLAKE2b-256 d8e19dbd5df7688d13eb348b61a23a55cb91f17141940148b0b7f3d9fe9037f0

See more details on using hashes here.

File details

Details for the file bfd.py-1.0.0-py3.6.egg.

File metadata

  • Download URL: bfd.py-1.0.0-py3.6.egg
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for bfd.py-1.0.0-py3.6.egg
Algorithm Hash digest
SHA256 f63b55f71f4ea90b0766daf77762caf6dea4cb6df73566edbb98929a62224d48
MD5 726be1a5e029136e5696f54279cf2f13
BLAKE2b-256 d97154889909a344b731a454133042be3c02b3cceede83a327e0317ebd0abf72

See more details on using hashes here.

File details

Details for the file bfd.py-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for bfd.py-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa04c0ca136a0f1a512084009fcd8b644f410f36a7c387b377ae84f6a6eb53be
MD5 f8844501e305e4d9a7fe3a9cc164cff3
BLAKE2b-256 04bc528c929aaa2722e0b73e722b2e7f0372214f7bc9de8b5eae0bca94abaeef

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page