ilyalatt / Telega

C# Telegram MTProto Client
https://ilyalatt.github.io/Telega/
MIT License
58 stars 15 forks source link

How to extend lib funcs? #67

Closed rocket-builder closed 3 years ago

rocket-builder commented 3 years ago

We need to send forwarded message, but we not found it in this lib. How we can implement forward message query and use it? We found ITgFunc interface, but we dont understand how to implement his methods.

ilyalatt commented 3 years ago

Hello. Telega generates all DTO based on tl scheme that specifies all possible requests and responses. You can find messages.forwardMessages signature that have corresponding ForwardMessages Telega class.You need to create an instance of ForwardMessages and pass it to Call method. Response type is inferred from request type. My current Telegram nickname is @chebukekes.