Merge pull request #735 from Chase22/fix-command-bot-constructors
Revert: Added deprecated constructor with the old style (e526b9db
)
This commit is contained in:
commit
21472d67cd
@ -22,7 +22,6 @@ import java.util.function.BiConsumer;
|
||||
*/
|
||||
public abstract class TelegramLongPollingCommandBot extends TelegramLongPollingBot implements ICommandRegistry {
|
||||
private final CommandRegistry commandRegistry;
|
||||
private String botUsername;
|
||||
|
||||
/**
|
||||
* Creates a TelegramLongPollingCommandBot using default options
|
||||
@ -33,19 +32,6 @@ public abstract class TelegramLongPollingCommandBot extends TelegramLongPollingB
|
||||
this(ApiContext.getInstance(DefaultBotOptions.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a TelegramLongPollingCommandBot using default options
|
||||
* Use ICommandRegistry's methods on this bot to register commands
|
||||
*
|
||||
* @param botUsername Username of the bot
|
||||
* @deprecated Overwrite {@link #getBotUsername() getBotUsername} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public TelegramLongPollingCommandBot(String botUsername){
|
||||
this();
|
||||
this.botUsername = botUsername;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a TelegramLongPollingCommandBot with custom options and allowing commands with
|
||||
* usernames
|
||||
@ -152,9 +138,7 @@ public abstract class TelegramLongPollingCommandBot extends TelegramLongPollingB
|
||||
* @return Bot username
|
||||
*/
|
||||
@Override
|
||||
public String getBotUsername(){
|
||||
return this.botUsername;
|
||||
};
|
||||
public abstract String getBotUsername();
|
||||
|
||||
/**
|
||||
* Process all updates, that are not commands.
|
||||
|
Loading…
Reference in New Issue
Block a user