无法发送CodeRequestAsync TLSharp电报

时间:2019-08-29 14:16:14

标签: c# telegram

使用TLsharp时我无法使用SendCodeRequestAsync()

df.dtypes
Formatted Date                           object
Summary                                  object
Precip Type                              object
Temperature (C)                         float64
Apparent Temperature (C)                float64
Humidity                                float64
Wind Speed (km/h)                       float64
Wind Bearing (degrees)                  float64
Visibility (km)                         float64
Loud Cover                              float64
Pressure (millibars)                    float64
Daily Summary                            object
Date                        datetime64[ns, UTC]

我在行中出现错误

private async void button1_Click(object sender, EventArgs e)
{
    var client = new TelegramClient(974478, "51bdb94bc9fe51f5ad606bf1b7053521");
    await client.ConnectAsync();

    var hash = await client.SendCodeRequestAsync("+6281277xxxx");
    var code = "<code_from_telegram>"; // you can change code in debugger

    var user = await client.MakeAuthAsync("<user_number>", hash, code);
}

错误是:

  

连接尝试失败是因为被连接方在一段时间后未正确响应,或者建立连接失败是因为连接的主机未响应。

我该如何解决?

0 个答案:

没有答案