TLSharp icon indicating copy to clipboard operation
TLSharp copied to clipboard

@vuminhit

Open graymind123 opened this issue 5 years ago • 1 comments

@vuminhit I don't use StarkSoft anymore and this repository. you can use the main API with tdsharp. then you can use the core function addProxy.

Originally posted by @mostafa8026 in https://github.com/sochix/TLSharp/issues/319#issuecomment-620925291 I checked TdSharp library, but it seems, a lot of methods https://core.telegram.org/methods is omitted. Is there any way to call these methods like TLsharp general soloution : //Create request var req = new TLRequestSetTyping() { Action = new TLSendMessageTypingAction(), Peer = new TLInputPeerUser() { UserId = user.Id } };

//run request, and deserialize response to Boolean
return await client.SendRequestAsync<Boolean>(req);

graymind123 avatar Dec 04 '20 14:12 graymind123

Why don't you use like this:

await _client.ExecuteAsync(new TdApi.AddProxy
{
    Enable = true,
    Type = new TdApi.ProxyType.ProxyTypeSocks5(),
    Server = "127.0.0.1",
    Port = 1111
});

mostafa8026 avatar Dec 06 '20 05:12 mostafa8026