mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2025-12-06 06:52:01 +01:00
Releasing 3.1.1
This commit is contained in:
parent
6b3fcdb967
commit
ba523f7d21
|
|
@ -97,10 +97,10 @@ await DoLogin("+12025550156"); // user's phone_number
|
|||
async Task DoLogin(string loginInfo) // (add this method to your code)
|
||||
{
|
||||
while (client.User == null)
|
||||
switch (await client.Login(loginInfo)) // returns which config info is needed to continue login
|
||||
switch (await client.Login(loginInfo)) // returns which config is needed to continue login
|
||||
{
|
||||
case "verification_code": Console.Write("Code: "); loginInfo = Console.ReadLine(); break;
|
||||
case "name": loginInfo = "John Doe"; break; // if sign-up is required (first_name last_name)
|
||||
case "name": loginInfo = "John Doe"; break; // if sign-up is required (first/last_name)
|
||||
case "password": loginInfo = "secret!"; break; // if user has enabled 2FA
|
||||
default: loginInfo = null; break;
|
||||
}
|
||||
|
|
@ -134,7 +134,7 @@ foreach (var (id, chat) in chats.chats)
|
|||
switch (chat) // example of downcasting to their real classes:
|
||||
{
|
||||
case Chat basicChat when basicChat.IsActive:
|
||||
Console.WriteLine($"{id}: Basic chat: {basicChat.title} with {basicChat.participants_count} members");
|
||||
Console.WriteLine($"{id}: Basic chat: {basicChat.title}");
|
||||
break;
|
||||
case Channel group when group.IsGroup:
|
||||
Console.WriteLine($"{id}: Group {group.username}: {group.title}");
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
<RepositoryType>git</RepositoryType>
|
||||
<PackageTags>Telegram;Client;Api;UserBot;MTProto;TLSharp;OpenTl</PackageTags>
|
||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||
<PackageReleaseNotes>$(ReleaseNotes.Replace('|',$([System.Environment]::NewLine)))</PackageReleaseNotes>
|
||||
<PackageReleaseNotes>$(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))</PackageReleaseNotes>
|
||||
<NoWarn>IDE0079;0419;1573;1591;NETSDK1138</NoWarn>
|
||||
<DefineConstants>TRACE;OBFUSCATION</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
|
@ -42,9 +42,9 @@
|
|||
<None Include="..\logo.png" Link="Data\logo.png" Pack="true" PackagePath="\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!--<ItemGroup>
|
||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
</ItemGroup>-->
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
|
||||
<PackageReference Include="IndexRange" Version="1.0.2" />
|
||||
|
|
|
|||
Loading…
Reference in a new issue