English-Helper英语单词竞赛插件
-
单词竞赛插件
基于 Mirai Console 的英语单词竞赛插件
必备环境
- 该插件目前还不需要chat-command插件,但日后的更新可能会使用
使用方法
- 从 该项目的release中,下载最新版jar形式插件
- 将该jar文件放入 Mirai Console 的 Plugins 文件夹中
- 从 该项目的release中,下载 Books.zip 文件,将其解压到 mcl的目录下 ....data/english-helper/BooksData/Books(如果没有文件夹可以自行创建)
功能
指令 功能 背单词 <book> <times> 设定本群的单词竞赛信息,book为书名,times为次数,设定完毕后通过"开始"启动 开始 启动已经设置好的单词竞赛 每个单词的时间限制为20s
第5s若无人答出,给出第一个提示(提示首字母)
第10s若无人答出,给出第二个提示(提示前三个字母)
任何人都可以答题答对者加一分,最后降序输出所有获得过分数的群成员
使用截图
Todo
-
支持自定义修改答题时间
-
添加全局数据
数据来源
-
一楼应该放文档
-
老哥猛!
-
迷惑的问题
设置词书成功后开始出现如下问题:
2021-08-29 17:26:04 E/english-helper: Exception in coroutine Plugin english-helper of english-helper kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 191010: Expected start of the object '{', but had ':' instead JSON input: .....an": " 心神不安的; 担心的"}]}, "2245":"2246":{"word": "swivel", "tr..... at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:24) at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:32) at kotlinx.serialization.json.internal.JsonLexer.fail(JsonLexer.kt:479) at kotlinx.serialization.json.internal.JsonLexer.fail(JsonLexer.kt:215) at kotlinx.serialization.json.internal.JsonLexer.unexpectedToken(JsonLexer.kt:198) at kotlinx.serialization.json.internal.JsonLexer.consumeNextToken(JsonLexer.kt:188) at kotlinx.serialization.json.internal.StreamingJsonDecoder.beginStructure(StreamingJsonDecoder.kt:37) at xyz.salieri.english.type.Word$$serializer.deserialize(Word.kt) at xyz.salieri.english.type.Word$$serializer.deserialize(Word.kt:7) at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:63) at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:32) at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableValue(AbstractDecoder.kt:43) at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableElement(AbstractDecoder.kt:70) at kotlinx.serialization.encoding.CompositeDecoder$DefaultImpls.decodeSerializableElement$default(Decoding.kt:535) at kotlinx.serialization.internal.MapLikeSerializer.readElement(CollectionSerializers.kt:111) at kotlinx.serialization.internal.MapLikeSerializer.readElement(CollectionSerializers.kt:84) at kotlinx.serialization.internal.AbstractCollectionSerializer.readElement$default(CollectionSerializers.kt:51) at kotlinx.serialization.internal.AbstractCollectionSerializer.merge(CollectionSerializers.kt:36) at kotlinx.serialization.internal.AbstractCollectionSerializer.deserialize(CollectionSerializers.kt:43) at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:63) at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:32) at kotlinx.serialization.json.Json.decodeFromString(Json.kt:95) at xyz.salieri.mirai.plugin.EnglishLoadKt.readIELTS(EnglishLoad.kt:71) at xyz.salieri.mirai.plugin.EnglishLoadKt.access$readIELTS(EnglishLoad.kt:1) at xyz.salieri.mirai.plugin.BookData$BookIELTS$2.invoke(EnglishLoad.kt:40) at xyz.salieri.mirai.plugin.BookData$BookIELTS$2.invoke(EnglishLoad.kt:35) at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74) at xyz.salieri.mirai.plugin.BookData.getBookIELTS(EnglishLoad.kt) at xyz.salieri.mirai.plugin.EnglishToolsKt.randomword(EnglishTools.kt:15) at xyz.salieri.english.type.Comp.run(Comp.kt:97) at xyz.salieri.english.type.Comps.mainlogic(Comps.kt:50) at xyz.salieri.mirai.plugin.EnglishHelperPlugin$onEnable$2.invokeSuspend(EnglishHelperPlugin.kt:41) at xyz.salieri.mirai.plugin.EnglishHelperPlugin$onEnable$2.invoke(EnglishHelperPlugin.kt) at net.mamoe.mirai.event.EventChannel$subscribeAlways$1.invokeSuspend(EventChannel.kt:432) at net.mamoe.mirai.event.EventChannel$subscribeAlways$1.invoke(EventChannel.kt) at net.mamoe.mirai.event.EventChannel$subscribeAlways$1.invoke(EventChannel.kt) at net.mamoe.mirai.internal.event.Handler$onEvent$2.invokeSuspend(InternalEventListeners.kt:50) at net.mamoe.mirai.internal.event.Handler$onEvent$2.invoke(InternalEventListeners.kt) at net.mamoe.mirai.internal.event.Handler$onEvent$2.invoke(InternalEventListeners.kt) at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89) at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:165) at kotlinx.coroutines.BuildersKt.withContext(Unknown Source) at net.mamoe.mirai.internal.event.Handler.onEvent(InternalEventListeners.kt:50) at net.mamoe.mirai.internal.event.InternalEventListenersKt.process(InternalEventListeners.kt:160) at net.mamoe.mirai.internal.event.InternalEventListenersKt.callAndRemoveIfRequired(InternalEventListeners.kt:109) at net.mamoe.mirai.event._EventBroadcast.broadcastImpl(Event.kt:174) at net.mamoe.mirai.IMirai.broadcastEvent(IMirai.kt:312) at net.mamoe.mirai.internal.MiraiImpl.broadcastEvent$suspendImpl(MiraiImpl.kt:304) at net.mamoe.mirai.internal.MiraiImpl.broadcastEvent(MiraiImpl.kt) at net.mamoe.mirai.event._EventBroadcast.broadcastPublic$suspendImpl(Event.kt:161) at net.mamoe.mirai.event._EventBroadcast.broadcastPublic(Event.kt) at net.mamoe.mirai.event.EventKt.broadcast(Event.kt:148) at net.mamoe.mirai.internal.network.components.EventDispatcherImpl$broadcast$2.invokeSuspend(EventDispatcher.kt:90) at net.mamoe.mirai.internal.network.components.EventDispatcherImpl$broadcast$2.invoke(EventDispatcher.kt) at net.mamoe.mirai.internal.network.components.EventDispatcherImpl$broadcast$2.invoke(EventDispatcher.kt) at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89) at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:165) at kotlinx.coroutines.BuildersKt.withContext(Unknown Source) at net.mamoe.mirai.internal.network.components.EventDispatcherImpl.broadcast$suspendImpl(EventDispatcher.kt:89) at net.mamoe.mirai.internal.network.components.EventDispatcherImpl.broadcast(EventDispatcher.kt) at net.mamoe.mirai.internal.network.components.EventDispatcherImpl$broadcastAsync$job$1.invokeSuspend(EventDispatcher.kt:105) at net.mamoe.mirai.internal.network.components.EventDispatcherImpl$broadcastAsync$job$1.invoke(EventDispatcher.kt) at net.mamoe.mirai.internal.network.components.EventDispatcherImpl$broadcastAsync$job$1.invoke(EventDispatcher.kt) at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:55) at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:112) at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126) at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:56) at kotlinx.coroutines.BuildersKt.launch(Unknown Source) at net.mamoe.mirai.internal.network.components.EventDispatcherImpl.broadcastAsync-kKe4JaQ(EventDispatcher.kt:102) at net.mamoe.mirai.internal.network.components.EventDispatcher.broadcastAsync-kKe4JaQ$default(EventDispatcher.kt:35) at net.mamoe.mirai.internal.network.components.EventBroadcasterPacketHandler.impl(PacketHandler.kt:87) at net.mamoe.mirai.internal.network.components.EventBroadcasterPacketHandler.handlePacket(PacketHandler.kt:73) at net.mamoe.mirai.internal.network.components.PacketHandlerChain.handlePacket(PacketHandler.kt:42) at net.mamoe.mirai.internal.network.handler.NetworkHandlerSupport$collectReceived$3.invokeSuspend(NetworkHandlerSupport.kt:84) at net.mamoe.mirai.internal.network.handler.NetworkHandlerSupport$collectReceived$3.invoke(NetworkHandlerSupport.kt) at net.mamoe.mirai.internal.network.handler.NetworkHandlerSupport$collectReceived$3.invoke(NetworkHandlerSupport.kt) at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:55) at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:112) at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126) at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:56) at kotlinx.coroutines.BuildersKt.launch(Unknown Source) at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(Builders.common.kt:47) at kotlinx.coroutines.BuildersKt.launch$default(Unknown Source) at net.mamoe.mirai.internal.network.handler.NetworkHandlerSupport.collectReceived$mirai_core(NetworkHandlerSupport.kt:82) at net.mamoe.mirai.internal.network.impl.netty.NettyNetworkHandler$PacketDecodePipeline$2$1.invokeSuspend(NettyNetworkHandler.kt:186) 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)
-
怎么样添加新book呀,直接放文件到目录提示
不存在ABC这本单词书,目前存在的单词书有:
CET4 CET6 TOEFL IELTS KAOYAN GRE SAT -
@fuyon 请问您使用的版本对应哪个commit?之前有一系列更新没有放出release,您可以考虑使用3天前的release试试。
-
@ryan 请问您使用的版本对应哪个commit?动态读取词书的功能是在
96b65f49
之后提供的,但是当时没有放出支持该功能的release。您可以考虑使用3天前的release试试。 -
@Michael1015198808 请问这个是怎么回事:
2021-09-04 14:23:32 I/stdout: BOOKS.ZIP loaded
2021-09-04 14:23:32 I/stdout: java.io.FileNotFoundException: C:\Users\zhaoxiuqi\Downloads\mcl-1.2.2\data\english-helper\BooksData\Books\BOOKS.ZIP.json (系统找不到指定的文件。)
大佬帮帮我 -
@heckerz 要解压
-
@Michael1015198808 大佬帮帮(背单词 CET4 5,这个命令输入后就报错了)。。。。。
2021-09-08 09:41:25 E/english-helper: Exception in coroutine Plugin english-helper of english-helper
java.lang.NullPointerException: EnglishHelperPlugin.data…sData/Books").listFiles() must not be null
at xyz.salieri.mirai.plugin.EnglishToolsKt.getBooks(EnglishTools.kt:17)
at xyz.salieri.english.type.Comp.set(Comp.kt:73)
at xyz.salieri.english.type.Comps.mainlogic(Comps.kt:38)
at xyz.salieri.mirai.plugin.EnglishHelperPlugin$onEnable$2.invokeSuspend(EnglishHelperPlugin.kt:37)
at xyz.salieri.mirai.plugin.EnglishHelperPlugin$onEnable$2.invoke(EnglishHelperPlugin.kt)
at net.mamoe.mirai.event.EventChannel$subscribeAlways$1.invokeSuspend(EventChannel.kt:432)
at net.mamoe.mirai.event.EventChannel$subscribeAlways$1.invoke(EventChannel.kt)
at net.mamoe.mirai.event.EventChannel$subscribeAlways$1.invoke(EventChannel.kt)
at net.mamoe.mirai.internal.event.Handler$onEvent$2.invokeSuspend(InternalEventListeners.kt:50)
at net.mamoe.mirai.internal.event.Handler$onEvent$2.invoke(InternalEventListeners.kt)
at net.mamoe.mirai.internal.event.Handler$onEvent$2.invoke(InternalEventListeners.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:165)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at net.mamoe.mirai.internal.event.Handler.onEvent(InternalEventListeners.kt:50)
at net.mamoe.mirai.internal.event.InternalEventListenersKt.process(InternalEventListeners.kt:160)
at net.mamoe.mirai.internal.event.InternalEventListenersKt.callAndRemoveIfRequired(InternalEventListeners.kt:109)
at net.mamoe.mirai.internal.event.InternalEventListenersKt$callAndRemoveIfRequired$1.invokeSuspend(InternalEventListeners.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.UndispatchedCoroutine.afterResume(CoroutineContext.kt:142)
at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
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) -
我发现一个问题,好像没有停止...
-
@95721 你有把单词放在指定位置么
-
@tsudzuki 啥问题(现在开学了,我和原插件开发者估计没啥时间能花在这插件上了)
-
此回复已被删除! -
请问一下这些设置的参数是什么呀,readme 中好像指令没有写全
-
都设置好了,在群里一直回复不存在是什么原因呢
-
自己在github下的json包用不了吗?
-
此回复已被删除! -
请问能不能写一个关闭功能啊?
-
SAT.json里面第222个单词处位置有问题啊,单词不见了