rubenlagus / TelegramBots

Java library to create bots using Telegram Bots API
https://telegram.me/JavaBotsApi
MIT License
4.68k stars 1.18k forks source link

Customize BaseAbilityBot #698

Closed wonderf closed 4 years ago

wonderf commented 4 years ago

BaseAbilityBot have chain of functions for Update. Look like Stream.of(update) .filter(this::checkGlobalFlags) .filter(this::checkBlacklist) .map(this::addUser) .filter(this::filterReply) .map(this::getAbility) .filter(this::validateAbility) .filter(this::checkPrivacy) .filter(this::checkLocality) .filter(this::checkInput) .filter(this::checkMessageFlags) .map(this::getContext) .map(this::consumeUpdate) .forEach(this::postConsumption); I want change format of commands. Enought override getAbility but all methods private or smth like that.

addo47 commented 4 years ago

What do you mean format of commands? If you mean the /commands, we had a similar issue here.

wonderf commented 4 years ago

getAbility work with commands only start with '/' . For example I want use command '🎹 Music'.

addo47 commented 4 years ago

Oh, you may use replies for that!

wonderf commented 4 years ago

Actually replies for conversation. I want use this command for custom keyboard.

addo47 commented 4 years ago

Yes, you can do that too. Please read the wiki carefully...

On Mon, Dec 2, 2019, 11:47 AM wonderf notifications@github.com wrote:

Actually replies for conversation. I want use this command for custom keyboard.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rubenlagus/TelegramBots/issues/698?email_source=notifications&email_token=ACXS2QGARGPCO4C4PCYIGRLQWVQ3NA5CNFSM4JUAQKF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFUVPXA#issuecomment-560551900, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXS2QAZNL6U22W6XHC6GBTQWVQ3NANCNFSM4JUAQKFQ .