Skip to content

Latest commit

 

History

History
89 lines (54 loc) · 2.27 KB

classes-functions-errors.md

File metadata and controls

89 lines (54 loc) · 2.27 KB
description
Documentation in case you don't like the listed examples

Classes, Functions, Errors

{% hint style="info" %} For responses, please check the API documentation here, the responses are the same, except it adds the "time_taken" key {% endhint %}

delpy.Client(*args)

Client class for the wrapper

Args Type Required
bot discord.Client Only when posting
token str Only when posting
loop AbstractEventLoop No

delpy.Client().start_loop(*args) -> None

Function to start the automatic loop

Args Type Default Value Minimum Value Required
wait_for int 1800 30 No

delpy.Client().close_loop() -> None

Function to close the running loop

delpy.Client().post_stats(*args) -> [delpy.errors.HTTPException, dict]

Function to post the statistics to the API

Args Type Required
guildCount int Yes
shardCount int No

delpy.Client().get_website_stats() -> [delpy.errors.HTTPException, dict]

Function to get website's statistics

delpy.Client().get_website_health() -> [delpy.errors.HTTPException, dict]

Function to get website's health

delpy.Client().get_bot_info(*args) -> [delpy.errors.HTTPException, dict]

Function to get information about the bot

Args Type Required
botid int Yes

delpy.Client().get_server_info(*args) -> [delpy.errors.HTTPException, dict]

Function to get information about the bot

Args Type Required
serverid int Yes

delpy.Client.get_template_info(*args) -> [delpy.errors.HTTPException, dict]

Function to get information about the bot

Args Type Required
templateid str Yes

delpy.errors.DELpy

Base exception class for the wrapper

delpy.errors.HTTPException

Raised whenever the API returns status that isn't 200 OK

delpy.errors.Unauthorized

Raised when you do not provide the token while trying to update the statistics

delpy.errors.InvalidTime

Raised when the specified time for automatic loop is too short