Python
A simple Python API wrapper
Notice
This wrapper is intended to function within a discord.py client object and will not function correctly outside of one. More features and functionality will be added going forward
Installation
The project's github can be found here, while it's pypi page can be found here
Features
Server count posting
Built-in automatic & interval server count posting
Built-in voting webhook handler
Voting & server posting events
Examples
Auto posting servers
Auto posting posts the server count whenever the bot is added to/removed from a server, while still abiding with our ratelimits. This example also includes an on server post event.
Interval posting servers
Interval posting posts the server count at regular specified intervals, by default it is set to 30 minutes. This example also includes an on server post event.
Webhook voting event
Setting up webhooks, along with an event to recieve them
IMPORTANT: Your webhook url must end with /discordswebhook
if you wish to use a different path, please specify it using the path argument inside the webhook method path="/customwebhook"
,
IMPORTANT: To recieve webhooks you must have set up port forwarding and specified the port in the webhook section on your bot page, by default the port is 8080
Cog example
Using all the features within a cog
Last updated