Package net.dv8tion.jda.api.utils
Class SessionController.ShardedGateway
java.lang.Object
net.dv8tion.jda.api.utils.SessionController.ShardedGateway
- Enclosing interface:
SessionController
POJO containing the gateway endpoint and recommended shard total for a shard manager.
-
Constructor Summary
ConstructorDescriptionShardedGateway
(String url, int shardTotal) Creates a new GatewayBot instance with the provided propertiesShardedGateway
(String url, int shardTotal, int concurrency) -
Method Summary
Modifier and TypeMethodDescriptionint
The concurrency level for this bot.int
The recommended shard totalgetUrl()
The gateway endpoint
-
Constructor Details
-
ShardedGateway
Creates a new GatewayBot instance with the provided properties- Parameters:
url
- The gateway endpoint (wss)shardTotal
- The recommended shard total
-
ShardedGateway
-
-
Method Details
-
getUrl
The gateway endpoint- Returns:
- The endpoint
-
getShardTotal
public int getShardTotal()The recommended shard total- Returns:
- The shard total
-
getConcurrency
public int getConcurrency()The concurrency level for this bot.
This should not be a custom value as discord determines the eligible concurrency. Using a different concurrency value could result in issues and possibly a ban due to login spam.- Returns:
- The concurrency level
- See Also:
-