Class RequestHandler

    • Constructor Summary

      Constructors 
      Constructor Description
      RequestHandler()
      Deprecated.
      Empty constructor to get the class.
      RequestHandler​(boolean disableCache)
      Deprecated.
      Constructor that also allows you to set if the cache should be disabled.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      @Nullable org.json.JSONObject getAll​(@NotNull java.lang.String id)
      Deprecated.
      Gets information from BotBlock about the provided Bot.
      @Nullable org.json.JSONObject getAll​(@NotNull net.dv8tion.jda.api.JDA jda)
      Deprecated.
      Gets information from BotBlock about the provided Bot.
      @Nullable org.json.JSONObject getAll​(@NotNull net.dv8tion.jda.api.sharding.ShardManager shardManager)
      Deprecated.
      Gets information from BotBlock about the provided Bot.
      @Nullable org.json.JSONObject getAll​(java.lang.Long id)
      Deprecated.
      Gets information from BotBlock about the provided Bot.
      @Nullable org.json.JSONArray getBotInfo​(@NotNull java.lang.String id, @NotNull Site site)
      Deprecated.
      Gets the specific information from a single Botlist.
      @Nullable org.json.JSONArray getBotInfo​(@NotNull java.lang.String id, @NotNull java.lang.String site)
      Deprecated.
      Gets the specific information from a single Botlist.
      @Nullable org.json.JSONArray getBotInfo​(@NotNull net.dv8tion.jda.api.JDA jda, @NotNull Site site)
      Deprecated.
      Gets the specific information from a single Botlist.
      @Nullable org.json.JSONArray getBotInfo​(@NotNull net.dv8tion.jda.api.JDA jda, @NotNull java.lang.String site)
      Deprecated.
      Gets the specific information from a single Botlist.
      @Nullable org.json.JSONArray getBotInfo​(@NotNull net.dv8tion.jda.api.sharding.ShardManager shardManager, @NotNull Site site)
      Deprecated.
      Gets the specific information from a single Botlist.
      @Nullable org.json.JSONArray getBotInfo​(@NotNull net.dv8tion.jda.api.sharding.ShardManager shardManager, @NotNull java.lang.String site)
      Deprecated.
      Gets the specific information from a single Botlist.
      @Nullable org.json.JSONArray getBotInfo​(java.lang.Long id, @NotNull Site site)
      Deprecated.
      Gets the specific information from a single Botlist.
      @Nullable org.json.JSONArray getBotInfo​(java.lang.Long id, @NotNull java.lang.String site)
      Deprecated.
      Gets the specific information from a single Botlist.
      @Nullable org.json.JSONObject getBotInfos​(@NotNull java.lang.String id)
      Deprecated.
      Gets all the available Botlists as JSONObject.
      @Nullable org.json.JSONObject getBotInfos​(@NotNull net.dv8tion.jda.api.JDA jda)
      Deprecated.
      Gets all the available Botlists as JSONObject.
      @Nullable org.json.JSONObject getBotInfos​(@NotNull net.dv8tion.jda.api.sharding.ShardManager shardManager)
      Deprecated.
      Gets all the available Botlists as JSONObject.
      @Nullable org.json.JSONObject getBotInfos​(java.lang.Long id)
      Deprecated.
      Gets all the available Botlists as JSONObject.
      @Nullable org.json.JSONObject getBotlist​(@NotNull java.lang.String id, @NotNull Site site)
      Deprecated.
      Returns the provided botlist info that is saved on BotBlock.
      @Nullable org.json.JSONObject getBotlist​(@NotNull java.lang.String id, @NotNull java.lang.String site)
      Deprecated.
      Returns the provided botlist info that is saved in BotBlock.
      @Nullable org.json.JSONObject getBotlists​(@NotNull java.lang.String id)
      Deprecated.
      Returns the current botlists that BotBlock supports.
      @Nullable java.util.List<java.lang.String> getOwners​(@NotNull java.lang.String id)
      Deprecated.
      Gets the owners of a bot as a List.
      @Nullable java.util.List<java.lang.String> getOwners​(@NotNull net.dv8tion.jda.api.JDA jda)
      Deprecated.
      Gets the owners of a bot as a list.
      @Nullable java.util.List<java.lang.String> getOwners​(@NotNull net.dv8tion.jda.api.sharding.ShardManager shardManager)
      Deprecated.
      Gets the owners of a bot as a list.
      @Nullable java.util.List<java.lang.String> getOwners​(java.lang.Long id)
      Deprecated.
      Gets the owners of a bot as a list.
      void postGuilds​(@NotNull java.lang.String botId, int guilds, @NotNull BotBlockAPI botBlockAPI)
      Deprecated.
      Posts the provided guilds from the provided Bot id.
      void postGuilds​(@NotNull net.dv8tion.jda.api.JDA jda, @NotNull BotBlockAPI botBlockAPI)
      Deprecated.
      Posts the guilds from the provided JDA.
      void postGuilds​(@NotNull net.dv8tion.jda.api.sharding.ShardManager shardManager, @NotNull BotBlockAPI botBlockAPI)
      Deprecated.
      Posts guilds from the provided ShardManager.
      void postGuilds​(java.lang.Long botId, int guilds, @NotNull BotBlockAPI botBlockAPI)
      Deprecated.
      Posts the provided guilds from the provided Bot id.
      void startAutoPosting​(@NotNull java.lang.String botId, int guilds, @NotNull BotBlockAPI botBlockAPI)
      Deprecated.
      Starts a scheduler that posts the provided guilds of the provided bot id every X minutes.
      void startAutoPosting​(@NotNull net.dv8tion.jda.api.JDA jda, @NotNull BotBlockAPI botBlockAPI)
      Deprecated.
      Starts a scheduler that posts the guilds from the provided JDA every X minutes.
      void startAutoPosting​(@NotNull net.dv8tion.jda.api.sharding.ShardManager shardManager, @NotNull BotBlockAPI botBlockAPI)
      Deprecated.
      Starts a scheduler that posts the guilds from the provided ShardManager every X minutes.
      void startAutoPosting​(java.lang.Long botId, int guilds, @NotNull BotBlockAPI botBlockAPI)
      Deprecated.
      Starts a scheduler that posts the provided guilds of the provided bot id every X minutes.
      void stopAutoPosting()
      Deprecated.
      Stops the auto-posting by shutting down the scheduler.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RequestHandler

        public RequestHandler()
        Deprecated.
        Empty constructor to get the class.
      • RequestHandler

        public RequestHandler​(boolean disableCache)
        Deprecated.
        Constructor that also allows you to set if the cache should be disabled.
        It is NOT recommended to set disableCache to true! This can have unwanted side effects like getting rate limited.
        Parameters:
        disableCache - Boolean to set if the internal cache should be disabled. True means it gets disabled.
        Since:
        v2.3.0
    • Method Detail

      • getAll

        @Nullable
        public @Nullable org.json.JSONObject getAll​(@NotNull
                                                    @NotNull net.dv8tion.jda.api.JDA jda)
                                             throws java.io.IOException,
                                                    RatelimitedException
        Deprecated.
        Gets information from BotBlock about the provided Bot.
        The information can contain:
        • Bot id
        • Username
        • Discriminator
        • Botowners*
        • Server count*
        • OAuth invite*
        • Data of the botlists**
        *Based on most appearances on the botlists.
        **The provided data depends on the Botlist and can be different.

        A response could look like this:

        
         {
             "id": "123456789012345678",
             "username": "MyBot",
             "discriminator": "1234",
             "owners": [
                 "234567890123456789"
             ],
             "server_count": 100,
             "invite":"https://discordapp.com/oauth2/authorize?client_id=123456789012345678&scope=bot",
             "list_data": {
                 "somebotlist.com": [
                    <list data>,
                     200
                 ],
                 "otherlist.org": [
                    <list data>,
                     404
                 ]
             }
         }
         
        Parameters:
        jda - The instance of JDA to use.
        Returns:
        possibly-null JSONObject containing the bots information.
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
        Since:
        v2.0.0
      • getAll

        @Nullable
        public @Nullable org.json.JSONObject getAll​(java.lang.Long id)
                                             throws java.io.IOException,
                                                    RatelimitedException
        Deprecated.
        Gets information from BotBlock about the provided Bot.
        The information can contain:
        • Bot id
        • Username
        • Discriminator
        • Botowners*
        • Server count*
        • OAuth invite*
        • Data of the botlists**
        *Based on most appearances on the botlists.
        **The provided data depends on the Botlist and can be different.

        A response could look like this:

        
         {
             "id": "123456789012345678",
             "username": "MyBot",
             "discriminator": "1234",
             "owners": [
                 "234567890123456789"
             ],
             "server_count": 100,
             "invite":"https://discordapp.com/oauth2/authorize?client_id=123456789012345678&scope=bot",
             "list_data": {
                 "somebotlist.com": [
                    <list data>,
                     200
                 ],
                 "otherlist.org": [
                    <list data>,
                     404
                 ]
             }
         }
         
        Parameters:
        id - The id of the bot.
        Returns:
        possibly-null JSONObject containing the bots information.
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
        Since:
        v2.0.0
      • getAll

        @Nullable
        public @Nullable org.json.JSONObject getAll​(@NotNull
                                                    @NotNull net.dv8tion.jda.api.sharding.ShardManager shardManager)
                                             throws java.io.IOException,
                                                    RatelimitedException
        Deprecated.
        Gets information from BotBlock about the provided Bot.
        The information can contain:
        • Bot id
        • Username
        • Discriminator
        • Botowners*
        • Server count*
        • OAuth invite*
        • Data of the botlists**
        *Based on most appearances on the botlists.
        **The provided data depends on the Botlist and can be different.

        A response could look like this:

        
         {
             "id": "123456789012345678",
             "username": "MyBot",
             "discriminator": "1234",
             "owners": [
                 "234567890123456789"
             ],
             "server_count": 100,
             "invite":"https://discordapp.com/oauth2/authorize?client_id=123456789012345678&scope=bot",
             "list_data": {
                 "somebotlist.com": [
                    <list data>,
                     200
                 ],
                 "otherlist.org": [
                    <list data>,
                     404
                 ]
             }
         }
         
        Parameters:
        shardManager - The instance of ShardManager to use.
        Returns:
        possibly-null JSONObject containing the bots information.
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
        Since:
        v2.0.0
      • getAll

        @Nullable
        public @Nullable org.json.JSONObject getAll​(@NotNull
                                                    @NotNull java.lang.String id)
                                             throws java.io.IOException,
                                                    RatelimitedException
        Deprecated.
        Gets information from BotBlock about the provided Bot.
        The information can contain:
        • Bot id
        • Username
        • Discriminator
        • Botowners*
        • Server count*
        • OAuth invite*
        • Data of the botlists**
        *Based on most appearances on the botlists.
        **The provided data depends on the Botlist and can be different.

        A response could look like this:

        
         {
             "id": "123456789012345678",
             "username": "MyBot",
             "discriminator": "1234",
             "owners": [
                 "234567890123456789"
             ],
             "server_count": 100,
             "invite":"https://discordapp.com/oauth2/authorize?client_id=123456789012345678&scope=bot",
             "list_data": {
                 "somebotlist.com": [
                    <list data>,
                     200
                 ],
                 "otherlist.org": [
                    <list data>,
                     404
                 ]
             }
         }
         
        Parameters:
        id - The id of the bot.
        Returns:
        possibly-null JSONObject containing the bots information.
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
        Since:
        v2.0.0
      • getBotInfo

        @Nullable
        public @Nullable org.json.JSONArray getBotInfo​(@NotNull
                                                       @NotNull net.dv8tion.jda.api.JDA jda,
                                                       @NotNull
                                                       @NotNull Site site)
                                                throws java.io.IOException,
                                                       RatelimitedException
        Deprecated.
        Gets the specific information from a single Botlist.
        The returned data depends on the Botlist.

        The JSONObject will look something like this:

        
         {[
          <botlist data>,
           200
         ]}
         
        Parameters:
        jda - The JDA instance that should be used.
        site - The site to get information from.
        Returns:
        possibly-null JSONArray containing the bot information of a specific site.
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
        Since:
        v2.1.0
      • getBotInfo

        @Nullable
        public @Nullable org.json.JSONArray getBotInfo​(@NotNull
                                                       @NotNull net.dv8tion.jda.api.JDA jda,
                                                       @NotNull
                                                       @NotNull java.lang.String site)
                                                throws java.io.IOException,
                                                       RatelimitedException
        Deprecated.
        Gets the specific information from a single Botlist.
        The returned data depends on the Botlist.

        The JSONObject will look something like this:

        
         {[
          <botlist data>,
           200
         ]}
         
        Parameters:
        jda - The JDA instance that should be used.
        site - The sites name to get information from.
        A list of supported sites can be found here.
        Returns:
        possibly-null JSONArray containing the bot information of a specific site.
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
        Since:
        v2.0.0
      • getBotInfo

        @Nullable
        public @Nullable org.json.JSONArray getBotInfo​(java.lang.Long id,
                                                       @NotNull
                                                       @NotNull Site site)
                                                throws java.io.IOException,
                                                       RatelimitedException
        Deprecated.
        Gets the specific information from a single Botlist.
        The returned data depends on the Botlist.

        The JSONObject will look something like this:

        
         {[
          <botlist data>,
           200
         ]}
         
        Parameters:
        id - The id of the bot.
        site - The site to get information from.
        Returns:
        possibly-null JSONArray containing the bot information of a specific site.
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
        Since:
        v2.1.0
      • getBotInfo

        @Nullable
        public @Nullable org.json.JSONArray getBotInfo​(java.lang.Long id,
                                                       @NotNull
                                                       @NotNull java.lang.String site)
                                                throws java.io.IOException,
                                                       RatelimitedException
        Deprecated.
        Gets the specific information from a single Botlist.
        The returned data depends on the Botlist.

        The JSONObject will look something like this:

        
         {[
          <botlist data>,
           200
         ]}
         
        Parameters:
        id - The id of the bot.
        site - The sites name to get information from.
        A list of supported sites can be found here.
        Returns:
        possibly-null JSONArray containing the bot information of a specific site.
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
        Since:
        v2.0.0
      • getBotInfo

        @Nullable
        public @Nullable org.json.JSONArray getBotInfo​(@NotNull
                                                       @NotNull net.dv8tion.jda.api.sharding.ShardManager shardManager,
                                                       @NotNull
                                                       @NotNull Site site)
                                                throws java.io.IOException,
                                                       RatelimitedException
        Deprecated.
        Gets the specific information from a single Botlist.
        The returned data depends on the Botlist.

        The JSONObject will look something like this:

        
         {[
          <botlist data>,
           200
         ]}
         
        Parameters:
        shardManager - The ShardManager instance that should be used.
        site - The site to get information from.
        Returns:
        possibly-null JSONArray containing the bot information of a specific site.
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
        Since:
        v2.1.0
      • getBotInfo

        @Nullable
        public @Nullable org.json.JSONArray getBotInfo​(@NotNull
                                                       @NotNull net.dv8tion.jda.api.sharding.ShardManager shardManager,
                                                       @NotNull
                                                       @NotNull java.lang.String site)
                                                throws java.io.IOException,
                                                       RatelimitedException
        Deprecated.
        Gets the specific information from a single Botlist.
        The returned data depends on the Botlist.

        The JSONObject will look something like this:

        
         {[
          <botlist data>,
           200
         ]}
         
        Parameters:
        shardManager - The ShardManager instance that should be used.
        site - The sites name to get information from.
        A list of supported sites can be found here.
        Returns:
        possibly-null JSONArray containing the bot information of a specific site.
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
        Since:
        v2.0.0
      • getBotInfo

        @Nullable
        public @Nullable org.json.JSONArray getBotInfo​(@NotNull
                                                       @NotNull java.lang.String id,
                                                       @NotNull
                                                       @NotNull Site site)
                                                throws java.io.IOException,
                                                       RatelimitedException
        Deprecated.
        Gets the specific information from a single Botlist.
        The returned data depends on the Botlist.

        The JSONObject will look something like this:

        
         {[
          <botlist data>,
           200
         ]}
         
        Parameters:
        id - The id of the bot.
        site - The site to get information from.
        Returns:
        possibly-null JSONArray containing the bot information of a specific site.
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
        Since:
        v2.1.0
      • getBotInfo

        @Nullable
        public @Nullable org.json.JSONArray getBotInfo​(@NotNull
                                                       @NotNull java.lang.String id,
                                                       @NotNull
                                                       @NotNull java.lang.String site)
                                                throws java.io.IOException,
                                                       RatelimitedException
        Deprecated.
        Gets the specific information from a single Botlist.
        The returned data depends on the Botlist.

        The JSONObject will look something like this:

        
         {[
          <botlist data>,
           200
         ]}
         
        Parameters:
        id - The id of the bot.
        site - The sites name to get information from.
        A list of supported sites can be found here.
        Returns:
        possibly-null JSONArray containing the bot lists bot information.
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
        Since:
        v2.0.0
      • getBotInfos

        @Nullable
        public @Nullable org.json.JSONObject getBotInfos​(@NotNull
                                                         @NotNull net.dv8tion.jda.api.JDA jda)
                                                  throws java.io.IOException,
                                                         RatelimitedException
        Deprecated.
        Gets all the available Botlists as JSONObject.
        The data of each Botlist depends on the site.

        The JSONObject will look something like this:

        
         {
           "somebotlist.com": [
            <botlist data>,
             200
           ],
           "otherlist.org": [
            <botlist data>,
             404
           ]
         }
         
        Parameters:
        jda - The jda instance that should be used.
        Returns:
        Possibly-null JSONObject containing the bot lists and their information about the bot.
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
        Since:
        v2.0.0
      • getBotInfos

        @Nullable
        public @Nullable org.json.JSONObject getBotInfos​(java.lang.Long id)
                                                  throws java.io.IOException,
                                                         RatelimitedException
        Deprecated.
        Gets all the available Botlists as JSONObject.
        The data of each Botlist depends on the site.

        The JSONObject will look something like this:

        
         {
           "somebotlist.com": [
            <botlist data>,
             200
           ],
           "otherlist.org": [
            <botlist data>,
             404
           ]
         }
         
        Parameters:
        id - The id of the bot.
        Returns:
        Possibly-null JSONObject containing the bot lists and their information about the bot.
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
        Since:
        v2.0.0
      • getBotInfos

        @Nullable
        public @Nullable org.json.JSONObject getBotInfos​(@NotNull
                                                         @NotNull net.dv8tion.jda.api.sharding.ShardManager shardManager)
                                                  throws java.io.IOException,
                                                         RatelimitedException
        Deprecated.
        Gets all the available Botlists as JSONObject.
        The data of each Botlist depends on the site.

        The JSONObject will look something like this:

        
         {
           "somebotlist.com": [
            <botlist data>,
             200
           ],
           "otherlist.org": [
            <botlist data>,
             404
           ]
         }
         
        Parameters:
        shardManager - The ShardManager instance that should be used.
        Returns:
        Possibly-null JSONObject containing the bot lists and their information about the bot.
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
        Since:
        v2.0.0
      • getBotInfos

        @Nullable
        public @Nullable org.json.JSONObject getBotInfos​(@NotNull
                                                         @NotNull java.lang.String id)
                                                  throws java.io.IOException,
                                                         RatelimitedException
        Deprecated.
        Gets all the available Botlists as JSONObject.
        The data of each Botlist depends on the site.

        The JSONObject will look something like this:

        
         {
           "somebotlist.com": [
            <botlist data>,
             200
           ],
           "otherlist.org": [
            <botlist data>,
             404
           ]
         }
         
        Parameters:
        id - The id of the bot
        Returns:
        Possibly-null JSONObject containing the bot lists and their information about the bot.
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
        Since:
        v2.0.0
      • getBotlist

        @Nullable
        public @Nullable org.json.JSONObject getBotlist​(@NotNull
                                                        @NotNull java.lang.String id,
                                                        @NotNull
                                                        @NotNull Site site)
                                                 throws java.io.IOException,
                                                        RatelimitedException
        Deprecated.
        Returns the provided botlist info that is saved on BotBlock.

        A response could look like this:

        
         {
             "api_docs": "https://somebotlist.com/docs",
             "api_post": "https://somebotlist.com/api/v1/bots/:id/post",
             "api_field": "server_count",
             "api_shard_id": "shard_id",
             "api_shard_count": "shard_count",
             "api_shards": "shards",
             "api_get": "https://somebotlist.com/api/v1/bots/:id"
         }
         
        Parameters:
        id - The bots id. This is used for the cache.
        site - The site to get info from.
        Returns:
        Possibly-null JSONObject of the specified bot list.
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
        Since:
        v2.1.0
      • getBotlist

        @Nullable
        public @Nullable org.json.JSONObject getBotlist​(@NotNull
                                                        @NotNull java.lang.String id,
                                                        @NotNull
                                                        @NotNull java.lang.String site)
                                                 throws java.io.IOException,
                                                        RatelimitedException
        Deprecated.
        Returns the provided botlist info that is saved in BotBlock.

        A response could look like this:

        
         {
             "api_docs": "https://somebotlist.com/docs",
             "api_post": "https://somebotlist.com/api/v1/bots/:id/post",
             "api_field": "server_count",
             "api_shard_id": "shard_id",
             "api_shard_count": "shard_count",
             "api_shards": "shards",
             "api_get": "https://somebotlist.com/api/v1/bots/:id"
         }
         
        Parameters:
        id - The bots id. This is used for the cache.
        site - The name of the botlist.
        Returns:
        Possibly-null JSONObject of the specified bot list.
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
        Since:
        v2.0.0
      • getBotlists

        @Nullable
        public @Nullable org.json.JSONObject getBotlists​(@NotNull
                                                         @NotNull java.lang.String id)
                                                  throws java.io.IOException,
                                                         RatelimitedException
        Deprecated.
        Returns the current botlists that BotBlock supports.

        A response could look like this:

        
         {
             "somebotlist.com": {
                 "api_docs": "https://somebotlist.com/docs",
                 "api_post": "https://somebotlist.com/api/v1/bots/:id/post",
                 "api_field": "server_count",
                 "api_shard_id": "shard_id",
                 "api_shard_count": "shard_count",
                 "api_shards": "shards",
                 "api_get": "https://somebotlist.com/api/v1/bots/:id"
             },
             "otherlist.org": {
                 "api_docs": "https://docs.otherlist.org",
                 "api_post": null,
                 "api_field": null,
                 "api_shard_id": null,
                 "api_shard_count": null,
                 "api_shards": null,
                 "api_get": "https://api.otherlist.org/v2/bot/:id"
             }
         }
         
        Parameters:
        id - The bots id. This is used for the cache.
        Returns:
        Possibly-null JSONObject of the specified bot list.
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
        Since:
        v2.0.0
      • getOwners

        @Nullable
        public @Nullable java.util.List<java.lang.String> getOwners​(@NotNull
                                                                    @NotNull net.dv8tion.jda.api.JDA jda)
                                                             throws java.io.IOException,
                                                                    RatelimitedException
        Deprecated.
        Gets the owners of a bot as a list.
        Parameters:
        jda - The JDA instance that should be used.
        Returns:
        Possibly-null JSONArray with the IDs of the bot owner(s).
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
        Since:
        v2.0.0
      • getOwners

        @Nullable
        public @Nullable java.util.List<java.lang.String> getOwners​(java.lang.Long id)
                                                             throws java.io.IOException,
                                                                    RatelimitedException
        Deprecated.
        Gets the owners of a bot as a list.
        Parameters:
        id - The id of the bot.
        Returns:
        Possibly-null JSONArray with the IDs of the bot owner(s).
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
        Since:
        v2.0.0
      • getOwners

        @Nullable
        public @Nullable java.util.List<java.lang.String> getOwners​(@NotNull
                                                                    @NotNull net.dv8tion.jda.api.sharding.ShardManager shardManager)
                                                             throws java.io.IOException,
                                                                    RatelimitedException
        Deprecated.
        Gets the owners of a bot as a list.
        Parameters:
        shardManager - The ShardManager instance that should be used.
        Returns:
        Possibly-null JSONArray with the IDs of the bot owner(s).
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
        Since:
        v2.0.0
      • getOwners

        @Nullable
        public @Nullable java.util.List<java.lang.String> getOwners​(@NotNull
                                                                    @NotNull java.lang.String id)
                                                             throws java.io.IOException,
                                                                    RatelimitedException
        Deprecated.
        Gets the owners of a bot as a List.
        Parameters:
        id - The ID of the bot to get information from.
        Returns:
        Possibly-null JSONArray with the IDs of the bot owner(s).
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
        Since:
        v2.0.0
      • postGuilds

        public void postGuilds​(@NotNull
                               @NotNull net.dv8tion.jda.api.JDA jda,
                               @NotNull
                               @NotNull BotBlockAPI botBlockAPI)
                        throws java.io.IOException,
                               RatelimitedException
        Deprecated.
        Posts the guilds from the provided JDA.
        If the bot is part of sharding and the shard count is bigger than 1, then shard_id and shard_count are added too. Those values are not supported by all sites!

        If you use this on a sharded bot, better use postGuilds(ShardManager, BotBlockAPI).

        Parameters:
        jda - The JDA instance that should be used.
        botBlockAPI - The BotBlockAPI instance that should be used.
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
      • postGuilds

        public void postGuilds​(java.lang.Long botId,
                               int guilds,
                               @NotNull
                               @NotNull BotBlockAPI botBlockAPI)
                        throws java.io.IOException,
                               RatelimitedException
        Deprecated.
        Posts the provided guilds from the provided Bot id.
        Parameters:
        botId - The ID (as long) of the bot.
        guilds - The guilds the bot is in.
        botBlockAPI - The BotBlockAPI instance that should be used.
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
      • postGuilds

        public void postGuilds​(@NotNull
                               @NotNull net.dv8tion.jda.api.sharding.ShardManager shardManager,
                               @NotNull
                               @NotNull BotBlockAPI botBlockAPI)
                        throws java.io.IOException,
                               RatelimitedException
        Deprecated.
        Posts guilds from the provided ShardManager.
        Parameters:
        shardManager - The ShardManager instance that should be used.
        botBlockAPI - The BotBlockAPI instance that should be used.
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
        java.lang.NullPointerException - When the ShardManager gives an invalid shard (Shard id 0 is null).
      • postGuilds

        public void postGuilds​(@NotNull
                               @NotNull java.lang.String botId,
                               int guilds,
                               @NotNull
                               @NotNull BotBlockAPI botBlockAPI)
                        throws java.io.IOException,
                               RatelimitedException
        Deprecated.
        Posts the provided guilds from the provided Bot id.
        Parameters:
        botId - The ID (as String) of the bot.
        guilds - The guilds the bot is in.
        botBlockAPI - The BotBlockAPI instance that should be used.
        Throws:
        java.io.IOException - When the post request couldn't be performed properly.
        RatelimitedException - When the Bot (IP or ID) got ratelimited.
      • startAutoPosting

        public void startAutoPosting​(@NotNull
                                     @NotNull net.dv8tion.jda.api.JDA jda,
                                     @NotNull
                                     @NotNull BotBlockAPI botBlockAPI)
        Deprecated.
        Starts a scheduler that posts the guilds from the provided JDA every X minutes.
        Parameters:
        jda - The JDA instance that should be used.
        botBlockAPI - The BotBlockAPI instance that should be used.
      • startAutoPosting

        public void startAutoPosting​(@NotNull
                                     @NotNull net.dv8tion.jda.api.sharding.ShardManager shardManager,
                                     @NotNull
                                     @NotNull BotBlockAPI botBlockAPI)
        Deprecated.
        Starts a scheduler that posts the guilds from the provided ShardManager every X minutes.
        Parameters:
        shardManager - The ShardManager instance that should be used.
        botBlockAPI - The BotBlockAPI instance that should be used.
      • startAutoPosting

        public void startAutoPosting​(java.lang.Long botId,
                                     int guilds,
                                     @NotNull
                                     @NotNull BotBlockAPI botBlockAPI)
        Deprecated.
        Starts a scheduler that posts the provided guilds of the provided bot id every X minutes.
        Parameters:
        botId - The ID (as Long) of the bot.
        guilds - The guilds the bot is in.
        botBlockAPI - The BotBlockAPI instance that should be used.
      • startAutoPosting

        public void startAutoPosting​(@NotNull
                                     @NotNull java.lang.String botId,
                                     int guilds,
                                     @NotNull
                                     @NotNull BotBlockAPI botBlockAPI)
        Deprecated.
        Starts a scheduler that posts the provided guilds of the provided bot id every X minutes.
        Parameters:
        botId - The ID (as String) of the bot.
        guilds - The guilds the bot is in.
        botBlockAPI - The BotBlockAPI instance that should be used.
      • stopAutoPosting

        public void stopAutoPosting()
        Deprecated.
        Stops the auto-posting by shutting down the scheduler.