`var client = NewClient("session" + Properties.Settings.Default.NumberToAuthenticate);
await client.ConnectAsync();
var estaRegistrado = await client.IsPhoneRegisteredAsync(Properties.Settings.Default.NumberToAuthenticate);
if (!estaRegistrado)
{
throw new Exception("账号没注册");
}
if (!client.IsUserAuthorized())
{
var hash = await client.SendCodeRequestAsync(Properties.Settings.Default.NumberToAuthenticate);
//等待logincode
Console.WriteLine("Input CodeToAuthenticate you received in client");
Console.WriteLine("CodeToAuthenticate>");
string code = Console.ReadLine();
TLUser user = null;
try
{
user = await client.MakeAuthAsync(Properties.Settings.Default.NumberToAuthenticate, hash, code);
}
catch (CloudPasswordNeededException ex)
{
var password = await client.GetPasswordSetting();
//var password_str = PasswordToAuthenticate;
//user = await client.MakeAuthWithPasswordAsync(password, password_str);
}
catch (InvalidPhoneCodeException ex)
{
throw new Exception("CodeToAuthenticate is wrong in the app.config file, fill it with the code you just got now by SMS/Telegram",
ex);
}
}`
It will be banned after login in with nothing to do .
Any problem?