addo47 / ExampleBots

Example bots for the AbilityBots API and abstraction
GNU General Public License v3.0
18 stars 8 forks source link

Custom send method #1

Closed TheCanay closed 2 years ago

TheCanay commented 2 years ago

Hi! I'm new to your library, so I need help. In your example, java doc says that the bot is used custom sender implementation with the send method

https://github.com/addo47/ExampleBots/blob/master/src/main/java/org/telegram/examplebots/ExampleBot.java

I downloaded the source code but didn't finad any code with that implementation of custom sender with send method. Where can I find it?

Thanks for the answer!

addo47 commented 2 years ago

Hey @TheCanay!

This repo is hella outdated. Please consult https://github.com/rubenlagus/TelegramBots/wiki for the most up-to-date documenation.

As for the question, yes you can still access the sender object. There's also a silent object that allows you to send messages without try-catching. No additional libraries are required, it's baked into the module. Make sure to use the latest version of AbilityBots.

TheCanay commented 2 years ago

Thanks for the answer, i tried to use silent instead of sender and the send method is working now. I'm using version 5.6.0 for both telegrambots-abilities and telegrambots