18
18
19
19
package org .botblock .javabotblockapi .requests ;
20
20
21
+ import org .botblock .javabotblockapi .core .JavaBotBlockAPIInfo ;
21
22
import org .botblock .javabotblockapi .core .Site ;
22
23
import org .botblock .javabotblockapi .core .CheckUtil ;
23
24
import org .botblock .javabotblockapi .core .exceptions .RateLimitedException ;
@@ -53,11 +54,13 @@ public class GetBotAction{
53
54
* <li>User-Agent: {@code "JavaBotBlockAPI-0000/API_VERSION (Unknown; +https://jbba.dev) DBots/{id}"}</li>
54
55
* </ul>
55
56
*
57
+ * <p>Following Exceptions can be thrown from the {@link org.botblock.javabotblockapi.core.CheckUtil CheckUtil}:
58
+ * <ul>
59
+ * <li>{@link java.lang.NullPointerException NullPointerException} - When the provided id is empty.</li>
60
+ * </ul>
61
+ *
56
62
* @param id
57
63
* The id of the bot. This is required for the internal User-Agent.
58
- *
59
- * @throws java.lang.NullPointerException
60
- * When the provided id is empty.
61
64
*/
62
65
public GetBotAction (@ Nonnull String id ){
63
66
this (false , id );
@@ -72,17 +75,22 @@ public GetBotAction(@Nonnull String id){
72
75
* <li>User-Agent: {@code "JavaBotBlockAPI-0000/API_VERSION (Unknown; +https://jbba.dev) DBots/{id}"}</li>
73
76
* </ul>
74
77
*
78
+ * <p>Following Exceptions can be thrown from the {@link org.botblock.javabotblockapi.core.CheckUtil CheckUtil}:
79
+ * <ul>
80
+ * <li>{@link java.lang.NullPointerException NullPointerException} - When the provided id is empty.</li>
81
+ * </ul>
82
+ *
75
83
* @param disableCache
76
84
* If the cache should be disabled.
77
85
* <br>{@code true} means the cache is <b>disabled</b>.
78
86
* @param id
79
87
* The id of the bot. This is required for the internal User-Agent.
80
- *
81
- * @throws java.lang.NullPointerException
82
- * When the provided id is empty.
83
88
*/
84
89
public GetBotAction (boolean disableCache , @ Nonnull String id ){
85
- this (disableCache , "JavaBotBlockAPI-0000/API_VERSION (Unknown; +https://jbba.dev) DBots/{id}" , id );
90
+ this (disableCache , String .format (
91
+ "JavaBotBlockAPI-0000/%s (Unknown; +https://jbba.dev) DBots/{id}" ,
92
+ JavaBotBlockAPIInfo .VERSION
93
+ ), id );
86
94
}
87
95
88
96
/**
@@ -104,9 +112,6 @@ public GetBotAction(boolean disableCache, @Nonnull String id){
104
112
* The Name that should be used as User-Agent.
105
113
* @param id
106
114
* The id of the bot. This is required for the internal User-Agent.
107
- *
108
- * @throws java.lang.NullPointerException
109
- * When the provided userAgent or id is empty.
110
115
*/
111
116
public GetBotAction (boolean disableCache , @ Nonnull String userAgent , @ Nonnull String id ){
112
117
CheckUtil .notEmpty (userAgent , "UserAgent" );
0 commit comments