Metadata-Version: 2.1
Name: toppy-python
Version: 1.4.0
Summary: A simple API wrapper for Discord Bot List and Top.gg
Home-page: https://github.com/chawkk6404/toppy
Author: The Master
License: MIT
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
License-File: LICENSE.txt

toppy
======

A simple API wrapper for Top.gg and Discord Bot List made in Python.
Specifically meant for discord.py and some forks.



Documention
-----------
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

    from discord.ext import commands
    import toppy
    import aiohttp
    

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

    @bot.event
    async def on_dbl_autopost_error(error: aiohttp.ClientResponseError):  # or on_topgg_autopost_error
        print(f'Uh oh. An error occurred: {error.message}')
       
    
    
    bot.run(...)

