This commit is contained in:
Rubenlagus 2016-08-07 14:24:10 +02:00
parent 78bbe0b2c6
commit b039558c21

View File

@ -50,7 +50,6 @@ public abstract class TelegramLongPollingCommandBot extends TelegramLongPollingB
} }
/** /**
* function message filter.
* Override this function in your bot implementation to filter messages with commands * Override this function in your bot implementation to filter messages with commands
* *
* For example, if you want to prevent commands execution incoming from group chat: * For example, if you want to prevent commands execution incoming from group chat:
@ -58,12 +57,13 @@ public abstract class TelegramLongPollingCommandBot extends TelegramLongPollingB
* # return !message.getChat().isGroupChat(); * # return !message.getChat().isGroupChat();
* # * #
* *
* @note Default implementation doesn't filter anything
* @param message Received message * @param message Received message
* @return true if the message must be ignored by the command bot and treated as a non command message, * @return true if the message must be ignored by the command bot and treated as a non command message,
* false otherwise * false otherwise
*/ */
protected boolean filter(Message message) { protected boolean filter(Message message) {
return true; return false;
} }
@Override @Override