Can i get all messages from my channel or group? use telegram-bot-sdk

I use library telegram-bot-sdk and i have a question, exists method for get messages from channel or group? If not, how can i write my own method, where i should write this code? Or send me example code, how i can expand the library and add my own methods. Thank you!

I found API method https://core.telegram.org/method/channels.getMessages but don’t now how use it in my library.