Class BotClient.Builder
java.lang.Object
io.github.natanimn.telebof.BotClient.Builder
- Enclosing class:
BotClient
A builder of BotClient class.
Through this class, you create a new object of BotClient class.
- Since:
- 3 March 2025
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowedUpdates(Updates[] allowed_updates) Optionalbuild()limit(int limit) OptionallocalBotApiUrl(String localBotApiUrl) OptionalnumThreads(int numThreads) Optional.offset(int offset) OptionalOptionalskipOldUpdates(boolean skip) Optionaltimeout(int timeout) OptionaluseTestServer(boolean useTestServer) Optional
-
Constructor Details
-
Builder
-
-
Method Details
-
numThreads
Optional. Default is 2- Parameters:
numThreads- number of threads- Returns:
BotClient.Builder
-
localBotApiUrl
Optional- Parameters:
localBotApiUrl- local bot api url.- Returns:
BotClient.Builder- See Also:
-
skipOldUpdates
Optional- Parameters:
skip- skip last 24 hours update(supported on long polling)- Returns:
BotClient.Builder
-
proxy
Optional- Parameters:
proxy- custom proxy server- Returns:
BotClient.Builder
-
limit
Optional- Parameters:
limit- limit number of updates to receive(supported on long polling)- Returns:
BotClient.Builder
-
timeout
Optional- Parameters:
timeout- Timeout in seconds for long polling. Default is 20- Returns:
BotClient.Builder
-
offset
Optional- Parameters:
offset- Identifier of the first update to be returned.- Returns:
BotClient.Builder
-
allowedUpdates
Optional- Parameters:
allowed_updates- A JSON-serialized list of the update types you want your bot to receive. Specify an empty list to receive all update types exceptUpdate.chat_member,Update.message_reaction, andUpdate.message_reaction_count(default). If not specified, the previous setting will be used.- Returns:
BotClient.Builder
-
useTestServer
Optional- Parameters:
useTestServer- Run the bot on test server- Returns:
BotClient.Builder
-
build
-