Class Stats


  • public class Stats
    extends Object
    Class used to post Bot statistics (Server and shard count) to the Discordservices API.
    • Method Detail

      • postStats

        public void postStats​(long server)
        Performs a POST request towards the Stats endpoint.
        This will post the provided servers with shards being set to 1.

        Use postStats(long, long) if you also want to provide the shards.

        Rate Limits

        By default will the Wrapper only perform one request per 15 seconds per endpoint.
        If however, the Request either isn't successful or gets rate limited will those errors be logged in your terminal.

        Parameters:
        server - Amount of servers your bot is in.
      • postStats

        public void postStats​(long server,
                              long shards)
        Performs a POST request towards the Stats endpoint.
        This will post the provided servers with the provided shards.

        Rate Limits

        By default will the Wrapper only perform one request per 15 seconds per endpoint.
        If however, the Request either isn't successful or gets rate limited will those errors be logged in your terminal.

        Parameters:
        server - Amount of servers your bot is in.
        shards - Amount of shards your bot is in.