Skip to main content

boticordpy

An easy-to-use library designed to simplify interaction with the BotiCord API v3.

GitHub repo Docs PyPi

Installation

You can install the library in one of the following ways:

pip install boticordpy
python3 -m pip install boticordpy
pip install git+https://github.com/boticord/boticordpy

Usage

Automatic statistics sending (for discord.py API library):

from discord.ext import commands
from boticordpy import BoticordClient

bot = commands.Bot(command_prefix="!")


# Function that returns statistics.
async def get_stats():
return {"servers": len(bot.guilds), "shards": None, "members": len(bot.users)}


# Function that will be called if the statistics are successfully sent.
async def on_success_posting():
print("wow stats posting works")


boticord_client = BoticordClient(
"your_boticord_api_token", version=3
) # <--- BotiCord API token
autopost = (
boticord_client.autopost()
.init_stats(get_stats)
.on_success(on_success_posting)
.start("id_of_your_bot") # <--- Bot ID
)

bot.run("bot token") # <--- Discord Bot token

Need help?

If you need any help, we recommend you to read the library documentation again.

You can find us on BotiCord support server. Library developer: @Marakarka#0575