Skip to content

Commit 75b8216

Browse files
committed
[Runner] Restore before lwx finds out
1 parent 4cdde1a commit 75b8216

2 files changed

Lines changed: 11 additions & 130 deletions

File tree

Lagrange.Core.Runner/Program.cs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
1-
using System.Text;
1+
using System.Diagnostics;
2+
using System.Text;
23
using System.Text.Json;
34
using Lagrange.Core.Common;
5+
using Lagrange.Core.Common.Entity;
46
using Lagrange.Core.Common.Interface;
57
using Lagrange.Core.Events.EventArgs;
8+
using Lagrange.Core.Internal.Packets.Message;
9+
using Lagrange.Core.Message;
10+
using Lagrange.Core.Utility;
611

712
namespace Lagrange.Core.Runner;
813

914
internal static class Program
1015
{
1116
private static async Task Main()
1217
{
13-
var sign = new UrlSignProvider();
18+
var sign = new InteropSignProvider();
1419

1520
Console.OutputEncoding = Encoding.UTF8;
1621
Console.InputEncoding = Encoding.UTF8;
@@ -21,7 +26,7 @@ private static async Task Main()
2126
{
2227
context = BotFactory.Create(new BotConfig
2328
{
24-
Protocol = Protocols.Linux,
29+
Protocol = Protocols.Windows,
2530
SignProvider = sign,
2631
LogLevel = LogLevel.Trace
2732
}, JsonSerializer.Deserialize<BotKeystore>(await File.ReadAllTextAsync("keystore.json")) ?? throw new InvalidOperationException());
@@ -30,7 +35,7 @@ private static async Task Main()
3035
{
3136
context = BotFactory.Create(new BotConfig
3237
{
33-
Protocol = Protocols.Linux,
38+
Protocol = Protocols.Windows,
3439
SignProvider = sign,
3540
LogLevel = LogLevel.Trace
3641
});
@@ -59,7 +64,8 @@ private static async Task Main()
5964

6065
await context.Login();
6166

62-
67+
var builder = new MessageBuilder().Text("Awoo");
68+
var message = await context.SendFriendMessage(1925648680, builder.Build());
6369

6470
await Task.Delay(-1);
6571
}

Lagrange.Core.Runner/UrlSignProvider.cs

Lines changed: 0 additions & 125 deletions
This file was deleted.

0 commit comments

Comments
 (0)