Documentation
discordspy.Client(bot, token, post=None)
discordspy.Client(bot, token, post=None)Creates a discordspy client object to communicate discords.com API.
Paramaters
bot- A discord.Client object.token- Your bot's discords.com API token.post- A discordspy post object.
Methods
servers()
servers()Returns the number of servers the client is in.
Returns
server_count
post_servers()
post_servers()A method to post the number of server the client is in, cancels if the client is being ratelimited and a newer request is available.
webhook(port=None, auth="", path="/discordswebhook")
webhook(port=None, auth="", path="/discordswebhook")A method to post the number of server the client is in, cancels if the client is being ratelimited and a newer request is available.
Paramaters
port- The port that the client should listen to webhooks on, can't be in use. The default port is 8080.
auth- The plain text string used to verify that the request is coming from discords.com.
path- The path the webhook should be sent to.
discordspy.Post
discordspy.PostA non callable class to create post objects for posting stats
Methods
auto()
auto()Returns
Returns
<auto posting PostObject>
interval(seconds=0, minutes=0, hours=0)
interval(seconds=0, minutes=0, hours=0)Returns a PostObject to post stats at certain intervals, by default this is set to 30 minutes.
Parameters
seconds- part of the duration of the interval in seconds.
minutes- part of the duration of the interval in minutes
hours- part od the duration of the interval in hoursReturns
<interval posting PostObject>
Last updated