You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
org.luaj.vm2.LuaError: Event.subscribe("FriendMessageEvent", function(event)
local reply = tostring(event.message):gsub("吗",""):gsub("?","!"):gsub("?","!")
event.friend:sendMessage(Quote(msg) .. reply)
end)
-- 在mirai-console环境下可忽略下列代码
local bot = Bot(xx,"xx",{
fileBasedDeviceInfo = "device.json"
})
bot:login():3 bad argument: userdata expected, got nil
at org.luaj.vm2.LuaValue.argerror(LuaValue.java:1056)
at org.luaj.vm2.LuaValue.checkuserdata(LuaValue.java:1008)
at com.github.only52607.luakt.dsl.LuaValueExtensionsKt.getUserdataValue(LuaValueExtensions.kt:68)
at com.github.only52607.luamirai.lua.mirai.message.MessageConstructorsTable$4.invoke(MessageConstructorsTable.kt:44)
at com.github.only52607.luamirai.lua.mirai.message.MessageConstructorsTable$4.invoke(MessageConstructorsTable.kt:43)
at com.github.only52607.luakt.dsl.LuaFunctionBuilderDslKt$oneArgLuaFunctionOf$1.call(LuaFunctionBuilderDsl.kt:30)
at org.luaj.vm2.LuaClosure.execute(LuaClosure.java:363)
at org.luaj.vm2.LuaClosure.onInvoke(LuaClosure.java:178)
at org.luaj.vm2.LuaClosure.invoke(LuaClosure.java:171)
at com.github.only52607.luamirai.lua.mirai.event.EventTable$subscriberFunction$1$3.invokeSuspend(EventTable.kt:44)
at com.github.only52607.luamirai.lua.mirai.event.EventTable$subscriberFunction$1$3.invoke(EventTable.kt)
at com.github.only52607.luamirai.lua.mirai.event.EventTable$subscriberFunction$1$3.invoke(EventTable.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.event.EventChannel$filter$1$intercepted$thisIntercepted$1.invokeSuspend(EventChannel.kt:146)
at net.mamoe.mirai.event.EventChannel$filter$1$intercepted$thisIntercepted$1.invoke(EventChannel.kt)
at net.mamoe.mirai.event.EventChannel$filter$1$intercepted$thisIntercepted$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:166)
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:166)
at net.mamoe.mirai.internal.event.InternalEventListenersKt.callAndRemoveIfRequired(InternalEventListeners.kt:115)
at net.mamoe.mirai.event._EventBroadcast.broadcastImpl(Event.kt:175)
at net.mamoe.mirai.IMirai.broadcastEvent(IMirai.kt:318)
at net.mamoe.mirai.internal.MiraiImpl.broadcastEvent$suspendImpl(MiraiImpl.kt:308)
at net.mamoe.mirai.internal.MiraiImpl.broadcastEvent(MiraiImpl.kt)
at net.mamoe.mirai.event._EventBroadcast.broadcastPublic$suspendImpl(Event.kt:162)
at net.mamoe.mirai.event._EventBroadcast.broadcastPublic(Event.kt)
at net.mamoe.mirai.event.EventKt.broadcast(Event.kt:147)
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:166)
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.impl(PacketHandler.kt:80)
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$send$1.invokeSuspend(NettyNetworkHandler.kt:178)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Unknown Source)
2022-05-18 10:01:23 V/Bot 2228145613: 叶孤城(xx) -> 我吗?
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: