Skip to content

Commit 02cc8af

Browse files
committed
added updatesHandler() method to bot builder
1 parent 561f6b2 commit 02cc8af

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

library/src/main/java/com/pengrad/telegrambot/TelegramBot.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,12 @@ public Builder fileApiUrl(String fileApiUrl) {
143143
}
144144

145145
public Builder updateListenerSleep(long millis) {
146-
updatesHandler = new SleepUpdatesHandler(millis);
146+
this.updatesHandler = new SleepUpdatesHandler(millis);
147+
return this;
148+
}
149+
150+
public Builder updateListener(UpdatesHandler updatesHandler) {
151+
this.updatesHandler = updatesHandler;
147152
return this;
148153
}
149154

0 commit comments

Comments
 (0)