Merge branch 'xMandrake-dev' into dev
This commit is contained in:
commit
4dd8205974
@ -53,6 +53,19 @@ public abstract class TelegramLongPollingCommandBot extends TelegramLongPollingB
|
|||||||
this.commandRegistry = new CommandRegistry(allowCommandsWithUsername, getBotUsername());
|
this.commandRegistry = new CommandRegistry(allowCommandsWithUsername, getBotUsername());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a TelegramLongPollingCommandBot
|
||||||
|
* Use ICommandRegistry's methods on this bot to register commands
|
||||||
|
* @param options Bot options
|
||||||
|
* @param allowCommandsWithUsername true to allow commands with parameters (default),
|
||||||
|
* false otherwise
|
||||||
|
* @param botUsername bot username of this bot
|
||||||
|
*/
|
||||||
|
public TelegramLongPollingCommandBot(DefaultBotOptions options, boolean allowCommandsWithUsername, String botUsername) {
|
||||||
|
super(options);
|
||||||
|
this.commandRegistry = new CommandRegistry(allowCommandsWithUsername, botUsername);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final void onUpdateReceived(Update update) {
|
public final void onUpdateReceived(Update update) {
|
||||||
if (update.hasMessage()) {
|
if (update.hasMessage()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user