使用simbot-mirai覆盖LoginSolver失效
-
BotConfiguration botConfiguration = new BotConfiguration(); botConfiguration.setLoginSolver(new MyLoginSolver()); botConfiguration.fileBasedDeviceInfo(); Bot register = miraiBotManager.register(code, password, botConfiguration); //MyLoginSolver @Nullable @Override public Object onSolveSliderCaptcha(@NotNull Bot bot, @NotNull String url, @NotNull Continuation<? super String> continuation) { MiraiLogger logger = bot.getLogger(); System.out.println("验证码地址:" + url); logger.info("验证码url:" + url); return standardCharImageLoginSolver.onSolveSliderCaptcha(bot, url, continuation); }
登录时并未打印url