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

Since 'abilities' is of type 'ImmutableMap', it cannot be added dynamically #1294

Open Aiden-777 opened 9 months ago

Aiden-777 commented 9 months ago

https://github.com/rubenlagus/TelegramBots/blob/f343d17ae4d3b793cb70ed51bd2cc2e05c2a6e4a/telegrambots-abilities/src/main/java/org/telegram/abilitybots/api/bot/BaseAbilityBot.java#L364-L373

Haarolean commented 8 months ago

I guess it's on purpose. But the bigger question I have is why is this collected via reflection at all rather than implementing a method like Set<Ability> getAbilities in the BaseAbilityBot interface.