Skip to content

登录时提示 Error when processing the event: Lagrange.Core.Internal.Event.Login.LoginEvent #341

Answered by TheSnowfield
NoNameGMM asked this question in Q&A
Discussion options

You must be logged in to vote

@NoNameGMM 參考 kagami 的實現如下

public static async Task Main()
{
    Console.OutputEncoding = Encoding.UTF8;

    // Create bot
    _bot = BotFactory.Create(GetConfig(), GetDevice(), GetKeyStore());
    {
        // Print the log
        _bot.Invoker.OnBotLogEvent += (_, e) =>
            Console.WriteLine($"[{DateTime.Now:yyyy-MM-dd HH:mm:ss.fff}] " +
                                $"[{e.Level}] [{e.Tag}] {e.EventMessage}");

        // Handle the captcha
        _bot.Invoker.OnBotCaptchaEvent += (s, e) =>
        {
            Console.WriteLine($"Captcha: {e.Url}");
            Console.WriteLine("Please input ticket and randomString:");
            var ticket = Console.ReadLine();

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
7 replies
@DarkCWK
Comment options

@NoNameGMM
Comment options

@NoNameGMM
Comment options

@NoNameGMM
Comment options

@DarkCWK
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by TheSnowfield
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants