Merge pull request #735 from Chase22/fix-command-bot-constructors

Revert: Added deprecated constructor with the old style (e526b9db)
This commit is contained in:
Ruben Bermudez 2020-04-26 00:37:59 +01:00 committed by GitHub
commit 21472d67cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 17 deletions

View File

@ -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.