wiz0u / WTelegramClient

Telegram Client API (MTProto) library written 100% in C# and .NET
https://wiz0u.github.io/WTelegramClient/
MIT License
996 stars 164 forks source link

How to user AddChatUser method properly? #141

Closed canugurlu closed 1 year ago

canugurlu commented 1 year ago

Hi.

I have target chat ID and users ID (long).

await client.AddChatUser(chat, user);

How to use this method properly? When I try to write long ID's, I am getting error;

https://prnt.sc/cp0JgtXQZAd_

Thanks a lot!

awskt commented 1 year ago

To add/invite/remove a member in a chat/channel, you can look at this example https://wiz0u.github.io/WTelegramClient/EXAMPLES#add-members

ID is not enough. You need to create TL.InputPeer and TL.InputUserBase

canugurlu commented 1 year ago

To add/invite/remove a member in a chat/channel, you can look at this example https://wiz0u.github.io/WTelegramClient/EXAMPLES#add-members

ID is not enough. You need to create TL.InputPeer and TL.InputUserBase

Thanks for your reply mate!

Any example?

wiz0u commented 1 year ago

see also https://wiz0u.github.io/WTelegramClient/FAQ.html#access-hash

As it is not an issue with the library itself, here is not the right place to ask. For further questions about Telegram API usage, please ask them on StackOverflow so the whole community can help and benefit: https://stackoverflow.com/questions/ask?tags=c%23+wtelegramclient+telegram-api