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 SummaryConstructors
- 
Method SummaryModifier 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- 
numThreadsOptional. Default is 2- Parameters:
- numThreads- number of threads
- Returns:
- BotClient.Builder
 
- 
localBotApiUrlOptional- Parameters:
- localBotApiUrl- local bot api url.
- Returns:
- BotClient.Builder
- See Also:
 
- 
skipOldUpdatesOptional- Parameters:
- skip- skip last 24 hours update(supported on long polling)
- Returns:
- BotClient.Builder
 
- 
proxyOptional- Parameters:
- proxy- custom proxy server
- Returns:
- BotClient.Builder
 
- 
limitOptional- Parameters:
- limit- limit number of updates to receive(supported on long polling)
- Returns:
- BotClient.Builder
 
- 
timeoutOptional- Parameters:
- timeout- Timeout in seconds for long polling. Default is 20
- Returns:
- BotClient.Builder
 
- 
offsetOptional- Parameters:
- offset- Identifier of the first update to be returned.
- Returns:
- BotClient.Builder
 
- 
allowedUpdatesOptional- 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 except- Update.chat_member,- Update.message_reaction, and- Update.message_reaction_count(default). If not specified, the previous setting will be used.
- Returns:
- BotClient.Builder
 
- 
useTestServerOptional- Parameters:
- useTestServer- Run the bot on test server
- Returns:
- BotClient.Builder
 
- 
build
 
-