Noob of Information Security
shennoter / apexranklookup Goto Github PK
View Code? Open in Web Editor NEW一个mirai-console插件,用于查询Apex英雄玩家信息、地图轮换、复制器轮换、猎杀门槛、官方新闻等
License: GNU Affero General Public License v3.0
一个mirai-console插件,用于查询Apex英雄玩家信息、地图轮换、复制器轮换、猎杀门槛、官方新闻等
License: GNU Affero General Public License v3.0
1.在使用/apexadd id svipnb12138后使用/apexremove id svipnb12138,并没有取消对svipnb12138的监听,控制台每隔15分钟依旧显示“完成一次对svipnb12138的监听”。
2.、config.yml中mapRotationReminder: true,在群里输入/apexadd map后,确实显示“已添加对群号xxxxxxxxx的地图轮换提醒”,但是过了三个小时,群里并没有提醒
有个建议,如果调用/apexbd命令绑定后的QQ账号,可以在调用/apexid的命令时不填入id参数,机器人将自动查询已绑定的账号的信息。不需要额外学习调用命令/apex。这样对用户来说也许也比较方便
java版本:17
MCL版本:2.1.0
插件版本:1.4.1
出错命令:/apexid
2022-05-28 17:45:47 W/ApexLookUp: Exception in executing command [mirai:source:[1393],[1506089929]]/apexid vangams233
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at kotlin.reflect.jvm.internal.calls.CallerImpl$Method.callMethod(CallerImpl.kt:97)
at kotlin.reflect.jvm.internal.calls.CallerImpl$Method$Instance.call(CallerImpl.kt:113)
at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108)
at kotlin.reflect.jvm.internal.KCallableImpl.callDefaultMethod$kotlin_reflection(KCallableImpl.kt:159)
at kotlin.reflect.full.KCallables.callSuspendBy(KCallables.kt:74)
at net.mamoe.mirai.console.internal.command.CommandReflector$findSubCommands$6$1.invokeSuspend(CommandReflector.kt:329)
at net.mamoe.mirai.console.internal.command.CommandReflector$findSubCommands$6$1.invoke(CommandReflector.kt)
at net.mamoe.mirai.console.internal.command.CommandReflector$findSubCommands$6$1.invoke(CommandReflector.kt)
at net.mamoe.mirai.console.command.descriptor.CommandSignatureFromKFunctionImpl.call$suspendImpl(CommandSignature.kt:88)
at net.mamoe.mirai.console.command.descriptor.CommandSignatureFromKFunctionImpl.call(CommandSignature.kt)
at net.mamoe.mirai.console.internal.command.CommandManagerImplKt.executeCommandImpl(CommandManagerImpl.kt:168)
at net.mamoe.mirai.console.command.CommandManager.executeCommand$suspendImpl(CommandManager.kt:130)
at net.mamoe.mirai.console.command.CommandManager.executeCommand(CommandManager.kt)
at net.mamoe.mirai.console.command.CommandManager$INSTANCE.executeCommand(CommandManager.kt)
at net.mamoe.mirai.console.command.CommandManager.executeCommand$default(CommandManager.kt:125)
at chat-command-0.5.1.jar//net.mamoe.mirai.console.plugins.chat.command.PluginMain.handleCommand(PluginMain.kt:86)
at chat-command-0.5.1.jar//net.mamoe.mirai.console.plugins.chat.command.PluginMain$onEnable$2$1.invokeSuspend(PluginMain.kt:69)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Caused by: javax.imageio.IIOException: Can't get input stream from URL!
at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1407)
at ranklookup-1.4.1.mirai.jar//pers.shennoter.ApexImageKt.ImageCache(ApexImage.kt:28)
at ranklookup-1.4.1.mirai.jar//PlayerStatKt.playerPicturMode(PlayerStat.kt:46)
at ranklookup-1.4.1.mirai.jar//PlayerStatKt.playerStat(PlayerStat.kt:34)
at ranklookup-1.4.1.mirai.jar//Player.apexPlayerInfo(Commands.kt:22)
... 27 more
Caused by: java.io.FileNotFoundException: https://api.mozambiquehe.re/assets/banners/newcastle.jpg
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1920)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1520)
at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:250)
at java.base/java.net.URL.openStream(URL.java:1165)
at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1405)
... 31 more
/apex
绑定id的功能/apexbd
和/apexubd
,使用正则表达式过滤参数系统版本:腾讯云Ubuntu 20.04LTS
java版本:17
MCL版本:1.2.3
插件版本:1.1.0
出错命令:/apexmap
插件载入没问题,但是使用命令时mcl控制台会提示如下信息
E/console: java.lang.reflect.InvocationTargetException java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at kotlin.reflect.jvm.internal.calls.CallerImpl$Method.callMethod(CallerImpl.kt:97) at kotlin.reflect.jvm.internal.calls.CallerImpl$Method$Instance.call(CallerImpl.kt:113) at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108) at kotlin.reflect.jvm.internal.KCallableImpl.callDefaultMethod$kotlin_reflection(KCallableImpl.kt:159) at kotlin.reflect.full.KCallables.callSuspendBy(KCallables.kt:74) at net.mamoe.mirai.console.internal.command.CommandReflector$findSubCommands$6$1.invokeSuspend(CommandReflector.kt:305) at net.mamoe.mirai.console.internal.command.CommandReflector$findSubCommands$6$1.invoke(CommandReflector.kt) at net.mamoe.mirai.console.internal.command.CommandReflector$findSubCommands$6$1.invoke(CommandReflector.kt) at net.mamoe.mirai.console.command.descriptor.CommandSignatureFromKFunctionImpl.call$suspendImpl(CommandSignature.kt:88) at net.mamoe.mirai.console.command.descriptor.CommandSignatureFromKFunctionImpl.call(CommandSignature.kt) at net.mamoe.mirai.console.internal.command.CommandManagerImplKt.executeCommandImpl(CommandManagerImpl.kt:167) at net.mamoe.mirai.console.command.CommandManager.executeCommand(CommandManager.kt:131) at net.mamoe.mirai.console.command.CommandManager$INSTANCE.executeCommand(CommandManager.kt) at net.mamoe.mirai.console.terminal.ConsoleThreadKt$startupConsoleThread$3.invokeSuspend(ConsoleThread.kt:191) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665) Caused by: java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit at java.desktop/sun.awt.AppContext$2.run(AppContext.java:273) at java.desktop/sun.awt.AppContext$2.run(AppContext.java:262) at java.base/java.security.AccessController.doPrivileged(AccessController.java:318) at java.desktop/sun.awt.AppContext.initMainAppContext(AppContext.java:262) at java.desktop/sun.awt.AppContext$3.run(AppContext.java:315) at java.desktop/sun.awt.AppContext$3.run(AppContext.java:298) at java.base/java.security.AccessController.doPrivileged(AccessController.java:318) at java.desktop/sun.awt.AppContext.getAppContext(AppContext.java:297) at java.desktop/javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:129) at java.desktop/javax.imageio.ImageIO.<clinit>(ImageIO.java:66) at pers.shennoter.MapStatKt.mapPictureMode(MapStat.kt:45) at pers.shennoter.MapStatKt.mapStat(MapStat.kt:34) at pers.shennoter.Map.apexMapInfo(RankLookUp.kt:75) ... 24 more
ApiKey: WzhVrcA61fElDD12lSG0 mode: pic
[x]重装不同java版本
[x]切换headless和普通版java软件包
[x]重装不同版本mcl
[√]百度后添加环境变量
export JAVA_TOOL_OPTIONS="-Djava.awt.headless=true"
添加环境变量后,目前可以正常查询并发送图片
图片缓存目前全部存储于/data/pers.shennoter.ranklookup
目录下,图片缓存也有可能过期或者失效,因此可以新增一个可选的手动清除缓存的指令来清空/data/pers.shennoter.ranklookup
目录以实现清理图片缓存以避免未来可能出现的一些缓存问题。
作者有空的话可以给每个图片记录缓存时间并在某段时间后进行自动删除
查询群友成分更简单了。
如图,当配置设置如上时,应该跳过风暴点的提醒,但实际上跳过的是风暴点的下一张地图的提醒(奥林匹斯)。
在MapReminder.kt
中:
ApexRankLookUp/src/main/kotlin/utils/MapReminder.kt
Lines 77 to 79 in 8e96b08
res.battle_royale.current.map
改为res.battle_royale.next.map
。不管有无挂代理发现图片模式都要花十几秒的时间才能回复,请问有什么好办法加速一下这个进程吗
主要是同时也在使用另一个塔罗牌插件,发现几乎是秒发送250kb左右的图片,也试过用jpg了,apexapi官网查询每次查询时间都不超过60ms,那这个十几秒难道就是在生成图片吗(
终端显示‘ApexRankLookUp-1.6.0\gradle\wrapper\gradle-wrapper.properties' does not exist.
尝试往ApexRankLookUp-1.6.0\gradle\wrapper目录下添加1.5.3的gradle-wrapper.properties文件后编译成功
但显示的jar包名字为“ApexLookUp-1.5.5.mirai2.jar” 而非“ApexLookUp-1.6.0.mirai2.jar”
现在调用 /apexbd 命令和 /apexreg 命令 机器人没有反应,不知道是不是因为这个的缘故
查询玩家时提示如下,且只有查询玩家相关功能时出错,其他功能(例如地图轮换)正常。
已经尝试删除data/
文件夹下所有相关数据并删除插件重新安装,无效。
在插件刚装好(但字体配置有误)时是可以正常使用的。
mirai: 2.11.0
mirai-console: 2.11.0
chat-command: 0.5.1
插件版本: 1.5.1
报错信息:
2022-06-14 22:56:40 W/ApexLookUp: Exception in executing command `[mirai:source:[4596],[1192419039]]/apexid XXXXX`
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at kotlin.reflect.jvm.internal.calls.CallerImpl$Method.callMethod(CallerImpl.kt:97)
at kotlin.reflect.jvm.internal.calls.CallerImpl$Method$Instance.call(CallerImpl.kt:113)
at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108)
at kotlin.reflect.jvm.internal.KCallableImpl.callDefaultMethod$kotlin_reflection(KCallableImpl.kt:159)
at kotlin.reflect.full.KCallables.callSuspendBy(KCallables.kt:74)
at net.mamoe.mirai.console.internal.command.CommandReflector$findSubCommands$6$1.invokeSuspend(CommandReflector.kt:329)
at net.mamoe.mirai.console.internal.command.CommandReflector$findSubCommands$6$1.invoke(CommandReflector.kt)
at net.mamoe.mirai.console.internal.command.CommandReflector$findSubCommands$6$1.invoke(CommandReflector.kt)
at net.mamoe.mirai.console.command.descriptor.CommandSignatureFromKFunctionImpl.call$suspendImpl(CommandSignature.kt:88)
at net.mamoe.mirai.console.command.descriptor.CommandSignatureFromKFunctionImpl.call(CommandSignature.kt)
at net.mamoe.mirai.console.internal.command.CommandManagerImplKt.executeCommandImpl(CommandManagerImpl.kt:168)
at net.mamoe.mirai.console.command.CommandManager.executeCommand$suspendImpl(CommandManager.kt:130)
at net.mamoe.mirai.console.command.CommandManager.executeCommand(CommandManager.kt)
at net.mamoe.mirai.console.command.CommandManager$INSTANCE.executeCommand(CommandManager.kt)
at net.mamoe.mirai.console.command.CommandManager.executeCommand$default(CommandManager.kt:125)
at chat-command-0.5.1.jar//net.mamoe.mirai.console.plugins.chat.command.PluginMain.handleCommand(PluginMain.kt:86)
at chat-command-0.5.1.jar//net.mamoe.mirai.console.plugins.chat.command.PluginMain$onEnable$2$1.invokeSuspend(PluginMain.kt:69)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Caused by: java.lang.NullPointerException: Cannot invoke "Global.getRank()" because the return value of "ApexResponsePlayer.getGlobal()" is null
at ranklookup-1.5.1.mirai.jar//PlayerStatKt.playerPicturMode(PlayerStat.kt:44)
at ranklookup-1.5.1.mirai.jar//PlayerStatKt.playerStat(PlayerStat.kt:34at ranklookup-1.5.1.mirai.jar//Player.apexPlayerInfo(Commands.kt:19)
... 27 more
顺便,在查询轮换地图时好像也有问题:
2022-06-14 22:34:08 W/stderr: at com.google.gson.Gson.fromJson(Gson.java:897)
2022-06-14 22:34:08 W/stderr: at com.google.gson.Gson.fromJson(Gson.java:846)
2022-06-14 22:34:08 W/stderr: at com.google.gson.Gson.fromJson(Gson.java:817)
2022-06-14 22:34:08 W/stderr: at ranklookup-1.5.1.mirai.jar//pers.shennoter.MapReminderKt$mapReminder$mapTask$1.run(MapReminder.kt:63)
2022-06-14 22:34:08 W/stderr: at java.base/java.util.TimerThread.mainLoop(Timer.java:566)
2022-06-14 22:34:08 W/stderr: at java.base/java.util.TimerThread.run(Timer.java:516)
2022-06-14 22:34:08 W/stderr: Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
2022-06-14 22:34:08 W/stderr: at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:384)
2022-06-14 22:34:08 W/stderr: at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:215)
2022-06-14 22:34:08 W/stderr: ... 7 more
2022-03-07 21:09:29 W/RankLookUp: Exception in executing command [mirai:source:[28716],[-58621***]]/rank apexid ***
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at kotlin.reflect.jvm.internal.calls.CallerImpl$Method.callMethod(CallerImpl.kt:97)
at kotlin.reflect.jvm.internal.calls.CallerImpl$Method$Instance.call(CallerImpl.kt:113)
at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108)
at kotlin.reflect.jvm.internal.KCallableImpl.callDefaultMethod$kotlin_reflection(KCallableImpl.kt:159)
at kotlin.reflect.full.KCallables.callSuspendBy(KCallables.kt:74)
at net.mamoe.mirai.console.internal.command.CommandReflector$findSubCommands$6$1.invokeSuspend(CommandReflector.kt:305)
at net.mamoe.mirai.console.internal.command.CommandReflector$findSubCommands$6$1.invoke(CommandReflector.kt)
at net.mamoe.mirai.console.internal.command.CommandReflector$findSubCommands$6$1.invoke(CommandReflector.kt)
at net.mamoe.mirai.console.command.descriptor.CommandSignatureFromKFunctionImpl.call$suspendImpl(CommandSignature.kt:88)
at net.mamoe.mirai.console.command.descriptor.CommandSignatureFromKFunctionImpl.call(CommandSignature.kt)
at net.mamoe.mirai.console.internal.command.CommandManagerImplKt.executeCommandImpl(CommandManagerImpl.kt:167)
at net.mamoe.mirai.console.command.CommandManager.executeCommand(CommandManager.kt:131)
at net.mamoe.mirai.console.command.CommandManager$INSTANCE.executeCommand(CommandManager.kt)
at net.mamoe.mirai.console.command.CommandManager.executeCommand$default(CommandManager.kt:126)
at net.mamoe.mirai.console.plugins.chat.command.PluginMain.handleCommand(PluginMain.kt:86)
at net.mamoe.mirai.console.plugins.chat.command.PluginMain$onEnable$2$1.invokeSuspend(PluginMain.kt:69)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
Caused by: java.lang.IndexOutOfBoundsException: Index 1 out of bounds for length 1
at java.base/jdk.internal.util.Preconditions.outOfBounds(Unknown Source)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Unknown Source)
at java.base/jdk.internal.util.Preconditions.checkIndex(Unknown Source)
at java.base/java.util.Objects.checkIndex(Unknown Source)
at java.base/java.util.ArrayList.get(Unknown Source)
at pers.shennoter.PlayerStatKt.playerStat(PlayerStat.kt:46)
at pers.shennoter.MyCommand.apexPlayerInfo(RankLookUp.kt:26)
... 26 more
源码逻辑应该默认只有请求过多 Error ,存在冒号时机器人给予失败回复。
使用中存在其他类型的 Error, 如对存在EA账号但是没有玩过Apex的情况,返回
{"Error": "Player exists but has never played Apex Legends"}
但机器人QQ回复仍然是“错误,短时间内请求过多,请稍后再试”。 建议修改一下回复内容,直接贴出api返回值也可。
输入”/apexpred“指令 后显示的追猎指南图片中大逃杀和竞技场中的最低排名显示为-1
使用插件版本:1.5.3
地图名可以中文显示吗
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.