Removed unnecesarry botUsername argument
This commit is contained in:
parent
01a7e7dc21
commit
91508aeebb
@ -22,16 +22,14 @@ import java.util.function.BiConsumer;
|
|||||||
*/
|
*/
|
||||||
public abstract class TelegramLongPollingCommandBot extends TelegramLongPollingBot implements ICommandRegistry {
|
public abstract class TelegramLongPollingCommandBot extends TelegramLongPollingBot implements ICommandRegistry {
|
||||||
private final CommandRegistry commandRegistry;
|
private final CommandRegistry commandRegistry;
|
||||||
private String botUsername;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a TelegramLongPollingCommandBot using default options
|
* Creates a TelegramLongPollingCommandBot using default options
|
||||||
* Use ICommandRegistry's methods on this bot to register commands
|
* Use ICommandRegistry's methods on this bot to register commands
|
||||||
*
|
*
|
||||||
* @param botUsername Username of the bot
|
|
||||||
*/
|
*/
|
||||||
public TelegramLongPollingCommandBot(String botUsername) {
|
public TelegramLongPollingCommandBot() {
|
||||||
this(ApiContext.getInstance(DefaultBotOptions.class), botUsername);
|
this(ApiContext.getInstance(DefaultBotOptions.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -40,10 +38,9 @@ public abstract class TelegramLongPollingCommandBot extends TelegramLongPollingB
|
|||||||
* Use ICommandRegistry's methods on this bot to register commands
|
* Use ICommandRegistry's methods on this bot to register commands
|
||||||
*
|
*
|
||||||
* @param options Bot options
|
* @param options Bot options
|
||||||
* @param botUsername Username of the bot
|
|
||||||
*/
|
*/
|
||||||
public TelegramLongPollingCommandBot(DefaultBotOptions options, String botUsername) {
|
public TelegramLongPollingCommandBot(DefaultBotOptions options) {
|
||||||
this(options, true, botUsername);
|
this(options, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -53,11 +50,9 @@ public abstract class TelegramLongPollingCommandBot extends TelegramLongPollingB
|
|||||||
* @param options Bot options
|
* @param options Bot options
|
||||||
* @param allowCommandsWithUsername true to allow commands with parameters (default),
|
* @param allowCommandsWithUsername true to allow commands with parameters (default),
|
||||||
* false otherwise
|
* false otherwise
|
||||||
* @param botUsername bot username of this bot
|
|
||||||
*/
|
*/
|
||||||
public TelegramLongPollingCommandBot(DefaultBotOptions options, boolean allowCommandsWithUsername, String botUsername) {
|
public TelegramLongPollingCommandBot(DefaultBotOptions options, boolean allowCommandsWithUsername) {
|
||||||
super(options);
|
super(options);
|
||||||
this.botUsername = botUsername;
|
|
||||||
this.commandRegistry = new CommandRegistry(allowCommandsWithUsername, this.getBotUsername());
|
this.commandRegistry = new CommandRegistry(allowCommandsWithUsername, this.getBotUsername());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user