Skip to main content

A simple API wrapper for botblock.org providing server count posting to all bot lists and fetching bot information from all.

Project description

PyPI

discordlists.py

A simple API wrapper for botblock.org providing server count posting to all bot lists and fetching bot information from all.

Installation

Install via pip (recommended)

pip install discordlists.py

Features

  • POST server count
  • AUTOMATIC server count updating
  • ALL bot lists' APIs included
  • GET bot information from all bot lists and Discord

Example Discord.py Rewrite cog

import discordlists

from discord.ext import commands
from discord.ext.commands import Context


class DiscordLists:
    def __init__(self, bot):
        self.bot = bot
        self.api = discordlists.Client(self.bot)  # Create a Client instance
        self.api.set_auth("botsfordiscord.com", "cfd28b742fd7ddfab1a211934c88f3d483431e639f6564193") # Set authorisation token for a bot list
        self.api.start_loop()  # Posts the server count automatically every 30 minutes

    @commands.command()
    async def get_bot(self, ctx: Context, bot_id: int):
        """
        Gets a bot using discordlists.py
        """
        try:
            result = await self.api.get_bot_info(bot_id)
        except:
            await ctx.send("Request failed")
            return

        await ctx.send("Bot: {}#{} ({})\nOwners: {}\nServer Count: {:,}".format(
            result['username'], result['discriminator'], result['id'], 
            ", ".join(result['owners']), result['server_count']
        ))

def setup(bot):
    bot.add_cog(DiscordLists(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.

Files for discordlists.py, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size discordlists.py-1.0.0-py3.6.egg (8.8 kB) File type Egg Python version 3.6 Upload date Hashes View
Filename, size discordlists.py-1.0.0-py3-none-any.whl (9.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size discordlists.py-1.0.0.tar.gz (5.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page