Metadata-Version: 2.1
Name: toppy-python
Version: 2.0.0
Summary: A simple API wrapper for Discord Bot List, DiscordBotsGG, and Top.gg
Author: The Master
License: MIT
Project-URL: Documentation, https://toppy-python.readthedocs.io/en/latest/
Project-URL: Github, https://github.com/chawkk6404/toppy
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.8.0
Description-Content-Type: text/x-rst
Provides-Extra: cache
License-File: LICENSE.txt

toppy
======

.. image:: https://raw.githubusercontent.com/chawkk6404/toppy/master/docs/toppy-logo.png
   :alt: toppy logo


An API wrapper made for discord.py or any forks for Discord Bot List, DiscordBotsGG, and Top.gg.


Documentation
--------------
https://toppy-python.readthedocs.io/en/latest/


Installation
------------
**Python 3.8 or higher is needed**

.. code:: sh

    $ pip install -U toppy-python



Example
---------

.. code:: py

    import toppy
    from discord.ext import commands
    

    dbl_token = 'Your Discord Bot List token here'
    dbgg_token = 'Your DiscordBotsGG API token here'
    topgg_token = 'your Top.gg token here'
    
    bot = commands.Bot('!')  # or discord.Client()
    toppy_client = toppy.Client(
        bot,
        dbl_token=dbl_token,
        dbgg_token=dbgg_token,
        topgg_token=topgg_token
    )
    
    
    @bot.event
    async def on_dbl_autopost_success():  # dbl/dbgg/topgg
        print('Server count posted')
        print(f'Server count: {len(bot.guilds)}')
    

    @bot.event
    async def on_dbl_autopost_error(error: toppy.HTTPException):  # dbl/dbgg/topgg
        print(f'Uh oh. An error occurred. Status: {error.resp.status}')
       
    
    
    bot.run(...)

