dituon / petpet Goto Github PK
View Code? Open in Web Editor NEW根据模板生成图像
Home Page: http://d2n.moe/petpet/
License: GNU Affero General Public License v3.0
根据模板生成图像
Home Page: http://d2n.moe/petpet/
License: GNU Affero General Public License v3.0
戳一戳头像概率设置为100也不能百分百触发,设置成100也很难触发
刚才重新下载更新后的版本后加载时得到了如下结果:
“ C:\Users\Administrator\Desktop\Mirai\data\PetPet\xmmt.dituon.petpet\data.json (系统找不到指定的文件。)”
我观察图片的目录data.json似乎应该在更下一级?
{ "type": "IMG", "avatar": [{ "type": "TO", "pos": [42,37,115,115], "style": [GRAY], "round": false, "avatarOnTop": false }], "text": [], "alias": ["123123"], "inRandomList": false }
出错的脚本
/**
* 由用户选择模板
*/
@SubCommand("选择模板")
public void useTemplateWithoutTargetCommand(ConsoleCommandSender sender,
@Name("模板key") String petkey,
@Name("(可选)模板文本替换的参数") String... petReplaceArgs) {
useTemplateAndSave(sender, petkey, null, petReplaceArgs);
}
我用的其实是simplepetpet那边的这个方法(改成调用useTemplateAndSave
以便控制台测试),这是我的模板json的text设置:
"text": [
{
"text": "测试测试测试测试测试",
"color": "#66ccff",
"pos": [100, 100],
"size": 24
},
{
"text": "$txt1[我]超市$txt2[你]!",
"pos": [-300,150],
"color": "#FFFFFF",
"position": ["CENTER", "TOP"],
"style": "BOLD",
"size": 20,
"greedy": true
}
],
有关键字的那个基本用复制的readme示例里的
然后使用指令:
/制图 选择模板 checkin 天 地, 却得到:
再使用没有关键字的指令 /制图 选择模板 checkin 想测试填充默认值,得到:
我感觉应该还是我设置或者用法有问题,请问是哪里出错了呢
别人发出戳一戳,戳的不是机器人,但机器人仍然有可能对把被戳的人当做处理对象。
比如有一个图片是围观的,除了to以外还需要一些群员的头像来最大化效果,比如admin之类的?
因petdata越来越多导致发送pet返回keylist时报错,提示消息过长无法发送
建议支持使用图片或分多条消息合并转发等方式发送keylist,防止(在可见的将来)petdata过多发不了keylist的情况
不会提pr所以做的petdata没发上来这是可以说的吗
另报错如下:
2023-12-08 14:20:46 W/Bot.xxxxxxx: An exception occurred when processing event. Subscriber scope: ''. Broadcaster scope: 'Bot 3121782370.EventDispatcher'
net.mamoe.mirai.contact.MessageTooLargeException: message(Petpet KeyList:
gluing ( 打胶 )
need ( 需要 )
scratch_head ( 挠头 )
yamero ( yamero 那种事情 )
center_symmet...) is too large. Allow up to 50 images or 5000 chars
at net.mamoe.mirai.internal.message.protocol.outgoing.OutgoingMessagePipelineContext.verifyLength(OutgoingMessagePipeline.kt:99)
at net.mamoe.mirai.internal.message.protocol.impl.ForwardMessageProtocol$ForwardMessageUploader.process(ForwardMessageProtocol.kt:45)
at net.mamoe.mirai.internal.message.protocol.outgoing.OutgoingMessageProcessorAdapter.process(OutgoingMessagePipelineProcessor.kt:26)
at net.mamoe.mirai.internal.message.protocol.outgoing.OutgoingMessageProcessorAdapter.process(OutgoingMessagePipelineProcessor.kt:20)
at net.mamoe.mirai.internal.pipeline.AbstractProcessorPipeline.process$suspendImpl(ProcessorPipeline.kt:287)
at net.mamoe.mirai.internal.pipeline.AbstractProcessorPipeline.process(ProcessorPipeline.kt)
at net.mamoe.mirai.internal.pipeline.AbstractProcessorPipeline.process$suspendImpl(ProcessorPipeline.kt:275)
at net.mamoe.mirai.internal.pipeline.AbstractProcessorPipeline.process(ProcessorPipeline.kt)
at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacadeImpl.preprocessAndSendOutgoingImpl(MessageProtocolFacade.kt:361)
at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacadeImpl.preprocessAndSendOutgoing(MessageProtocolFacade.kt:348)
at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacade$INSTANCE.preprocessAndSendOutgoing(MessageProtocolFacade.kt)
at net.mamoe.mirai.internal.contact.AbstractUserKt.sendMessageImpl(AbstractUser.kt:263)
at net.mamoe.mirai.internal.contact.CommonGroupImpl.sendMessage$suspendImpl(GroupImpl.kt:221)
at net.mamoe.mirai.internal.contact.CommonGroupImpl.sendMessage(GroupImpl.kt)
at net.mamoe.mirai.contact.Group$sendMessage$1.invoke(Group.kt)
at net.mamoe.mirai.contact.Group$sendMessage$1.invoke(Group.kt)
at kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsJvmKt$createCoroutineUnintercepted$$inlined$createCoroutineFromSuspendFunction$IntrinsicsKt__IntrinsicsJvmKt$1.invokeSuspend(IntrinsicsJvm.kt:205)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlin.coroutines.ContinuationKt.startCoroutine(Continuation.kt:115)
at me.him188.kotlin.jvm.blocking.bridge.internal.RunSuspendKt.$runSuspend$(RunSuspend.kt:18)
at net.mamoe.mirai.contact.Group.sendMessage(Group.kt)
at petpet-6.1.mirai2.jar//moe.dituon.petpet.mirai.MiraiPetpet.sendKeyList(MiraiPetpet.java:458)
at petpet-6.1.mirai2.jar//moe.dituon.petpet.mirai.MiraiPetpet.responseMessage(MiraiPetpet.java:190)
at petpet-6.1.mirai2.jar//moe.dituon.petpet.mirai.MiraiPetpet.onGroupMessage(MiraiPetpet.java:158)
at net.mamoe.mirai.event.EventChannel$subscribeAlways$2$1.invoke(EventChannel.kt:605)
at net.mamoe.mirai.event.EventChannel$subscribeAlways$2$1.invoke(EventChannel.kt:605)
at kotlinx.coroutines.InterruptibleKt.runInterruptibleInExpectedContext(Interruptible.kt:51)
at kotlinx.coroutines.InterruptibleKt.access$runInterruptibleInExpectedContext(Interruptible.kt:1)
at kotlinx.coroutines.InterruptibleKt$runInterruptible$2.invokeSuspend(Interruptible.kt:43)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
设想:用直播粉丝群举例,在A群使用关键词『敲』时,使用对应A形象的模板,在B群使用『敲』时发送B形象的模板
是 form
不是 from
?
我觉得应该是 from
ヾ(≧▽≦*)o Petpet 初始化成功,使用 pet 以获取keyList! 2022-10-22 18:58:27 E/PetPet: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0 java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0 at xmmt.dituon.share.BasePetService.readData(BasePetService.java:35) at xmmt.dituon.plugin.PluginPetService.readData(PluginPetService.java:119) at xmmt.dituon.plugin.Petpet.onEnable(Petpet.java:54) at net.mamoe.mirai.console.internal.plugin.JvmPluginInternal.internalOnEnable$mirai_console(JvmPluginInternal.kt:113) at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.enable(BuiltInJvmPluginLoaderImpl.kt:122) at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt) at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt:36) at net.mamoe.mirai.console.plugin.PluginManager.enablePlugin(PluginManager.kt:129) at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.enableAllLoadedPlugins$mirai_console(PluginManagerImpl.kt:172) at net.mamoe.mirai.console.internal.MiraiConsoleImplementationBridge.doStart$mirai_console(MiraiConsoleImplementationBridge.kt:214) at net.mamoe.mirai.console.MiraiConsoleImplementation$Companion.start(MiraiConsoleImplementation.kt:276) at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon(MiraiConsoleTerminalLoader.kt:152) at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon$default(MiraiConsoleTerminalLoader.kt:151) at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.main(MiraiConsoleTerminalLoader.kt:47) 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 org.itxtech.mcl.Utility.bootMirai(Utility.java:84) 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 org.mozilla.javascript.MemberBox.invoke(MemberBox.java:138) at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:226) at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1692) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:1013) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:412) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3578) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:107) at org.mozilla.javascript.ArrowFunction.call(ArrowFunction.java:43) at org.mozilla.javascript.InterfaceAdapter.invokeImpl(InterfaceAdapter.java:155) at org.mozilla.javascript.InterfaceAdapter.lambda$invoke$0(InterfaceAdapter.java:105) at org.mozilla.javascript.Context.call(Context.java:554) at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:522) at org.mozilla.javascript.InterfaceAdapter.invoke(InterfaceAdapter.java:105) at org.mozilla.javascript.jdk18.VMBridge_jdk18$1.invoke(VMBridge_jdk18.java:126) at com.sun.proxy.$Proxy4.run(Unknown Source) at org.itxtech.mcl.script.ScriptManager.phaseBoot(ScriptManager.java:101) at org.itxtech.mcl.Loader.start(Loader.java:128) at org.itxtech.mcl.Loader.main(Loader.java:53)
是mirai版本导致的吗?还是和其他的插件有什么冲突?
群友经常一下发很多,插件相应每一个操作,于是乎机器人就被腾讯风控了,一天得手动解除数次。所以希望增加全局同一时间内相应次数限制来防止机器人被风控
2022-11-01 18:08:34 I/stdout: Petpet GifMakerThreadPoolSize: 3
2022-11-01 18:08:34 I/stdout: ヾ(≧▽≦*)o Petpet 初始化成功,使用 pet 以获取keyList!
2022-11-01 18:08:44 E/PetPet: java.awt.AWTError: Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable.
java.awt.AWTError: Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable.
at java.desktop/sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at java.desktop/sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:101)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at java.desktop/sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:60)
at java.desktop/sun.awt.PlatformGraphicsInfo.createGE(PlatformGraphicsInfo.java:36)
at java.desktop/java.awt.GraphicsEnvironment$LocalGE.createGE(GraphicsEnvironment.java:93)
at java.desktop/java.awt.GraphicsEnvironment$LocalGE.(GraphicsEnvironment.java:84)
at java.desktop/java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:106)
at petpet-4.9.mirai2.jar//moe.dituon.petpet.share.BasePetService.registerFontsToAwt(BasePetService.java:86)
at petpet-4.9.mirai2.jar//moe.dituon.petpet.share.BasePetService.readData(BasePetService.java:45)
at petpet-4.9.mirai2.jar//moe.dituon.petpet.plugin.PluginPetService.readData(PluginPetService.java:122)
at petpet-4.9.mirai2.jar//moe.dituon.petpet.plugin.Petpet.onEnable(Petpet.java:54)
at net.mamoe.mirai.console.internal.plugin.JvmPluginInternal.internalOnEnable$mirai_console(JvmPluginInternal.kt:131)
at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.enable(BuiltInJvmPluginLoaderImpl.kt:278)
at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.enable(BuiltInJvmPluginLoaderImpl.kt:35)
at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt)
at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt:50)
at net.mamoe.mirai.console.plugin.PluginManager.enablePlugin(PluginManager.kt:173)
at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.enableAllLoadedPlugins$mirai_console(PluginManagerImpl.kt:178)
at net.mamoe.mirai.console.internal.MiraiConsoleImplementationBridge.doStart$mirai_console(MiraiConsoleImplementationBridge.kt:235)
at net.mamoe.mirai.console.MiraiConsoleImplementation$Companion.start(MiraiConsoleImplementation.kt:464)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon(MiraiConsoleTerminalLoader.kt:168)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon$default(MiraiConsoleTerminalLoader.kt:167)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.main(MiraiConsoleTerminalLoader.kt:52)
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 org.itxtech.mcl.Utility.bootJars(Utility.java:89)
at org.itxtech.mcl.Utility.bootJars(Utility.java:79)
at org.itxtech.mcl.Utility.bootMirai(Utility.java:101)
at org.itxtech.mcl.module.builtin.Boot.boot(Boot.java:109)
at org.itxtech.mcl.module.ModuleManager.phaseBoot(ModuleManager.java:148)
at org.itxtech.mcl.Loader.lambda$start$4(Loader.java:189)
at org.itxtech.mcl.Loader.tryCatching(Loader.java:146)
at org.itxtech.mcl.Loader.start(Loader.java:189)
at org.itxtech.mcl.Loader.main(Loader.java:79)
在ubuntu账号启动可以正常运行。
点击 添加头像 之后控制台会报图片地址404 ,图片编辑页面不显示头像编辑框。Text文本框不受影响。
如图:
flowchart LR
InputStream("gif结果Stream")
其他调用形式 --> |选择index, 从本地文件读image, 选择data素材文件夹| PetData
miraiPLugin --> |选择index, 取头像image, plugin.resolveData作为素材文件夹| PetData
PetData --> |makeImageV2| InputStream
InputStream --> |其他调用形式| 保存为本地文件
InputStream --> |miraiPLugin| 发送
其中plugin.resolveData作为素材文件夹
对应 #7
如果你觉得这种调整合适,我可以提供PR。
当前BasePetService会负责所有ConfigDTO的字段,但是或许不合适。且随着plugin迭代,这类字段只会越来越多。
随机模板
功能,BasePetService就需要管理disabledKey字段;如果我们认为BasePetService只提供最基础的功能,调用者自行实现随机模板(例如调用者想用白名单的形式,调用者想控制随机权重),BasePetService就不需要管理disabledKey字段;一种修改方式:区分PluginConfig和ShareConfig两个类来管理。单独使用BasePetService则初始化只需ShareConfig;使用PluginPetService则初始化读入整个ConfigDTO,其中PluginConfig用于赋值PluginPetService自身,ShareConfig用于基类初始化。
ConfigDTO {
PluginConfig {
keyCommand
……
}
ShareConfig {
antialias
……
}
}
我正在写在别的项目二次开发petpet,尝试提供一个新手开发者可以上手的simplepetpet-plugin样例。此时1. ……会让他们感到疑惑
会更明显。
9个文本变量不够用()
在config中加入多repourl后,生成的key list有多次重复内容导致生成的key list长度过长
# PetPet.yml
repositoryUrls:
- 'https://mirror.ghproxy.com/https://raw.githubusercontent.com/MR-MonkeyRay/petpet/main'
- 'https://mirror.ghproxy.com/https://raw.githubusercontent.com/Dituon/petpet/main'
感觉可以排序和去重之后再输出..或者这里就是一个bug?
net.mamoe.mirai.contact.MessageTooLargeException: message(Petpet KeyList:
acclaim ( 喝彩 欢呼 )
addiction ( 上瘾 毒瘾发作 )
always ( 要我一直 )
anyasuki ( 阿尼亚 喜欢 )
applau...) is too large. Allow up to 50 images or 5000 chars
at net.mamoe.mirai.internal.message.protocol.outgoing.OutgoingMessagePipelineContext.verifyLength(OutgoingMessagePipeline.kt:99)
at net.mamoe.mirai.internal.message.protocol.impl.ForwardMessageProtocol$ForwardMessageUploader.process(ForwardMessageProtocol.kt:45)
at net.mamoe.mirai.internal.message.protocol.outgoing.OutgoingMessageProcessorAdapter.process(OutgoingMessagePipelineProcessor.kt:26)
at net.mamoe.mirai.internal.message.protocol.outgoing.OutgoingMessageProcessorAdapter.process(OutgoingMessagePipelineProcessor.kt:20)
at net.mamoe.mirai.internal.pipeline.AbstractProcessorPipeline.process$suspendImpl(ProcessorPipeline.kt:287)
at net.mamoe.mirai.internal.pipeline.AbstractProcessorPipeline.process(ProcessorPipeline.kt)
at net.mamoe.mirai.internal.pipeline.AbstractProcessorPipeline.process$suspendImpl(ProcessorPipeline.kt:275)
at net.mamoe.mirai.internal.pipeline.AbstractProcessorPipeline.process(ProcessorPipeline.kt)
at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacadeImpl.preprocessAndSendOutgoingImpl(MessageProtocolFacade.kt:361)
at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacadeImpl.preprocessAndSendOutgoing(MessageProtocolFacade.kt:348)
at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacade$INSTANCE.preprocessAndSendOutgoing(MessageProtocolFacade.kt)
at net.mamoe.mirai.internal.contact.AbstractUserKt.sendMessageImpl(AbstractUser.kt:263)
at net.mamoe.mirai.internal.contact.CommonGroupImpl.sendMessage$suspendImpl(GroupImpl.kt:221)
at net.mamoe.mirai.internal.contact.CommonGroupImpl.sendMessage(GroupImpl.kt)
at net.mamoe.mirai.contact.Group$sendMessage$1.invoke(Group.kt)
at net.mamoe.mirai.contact.Group$sendMessage$1.invoke(Group.kt)
at kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsJvmKt$createCoroutineUnintercepted$$inlined$createCoroutineFromSuspendFunction$IntrinsicsKt__IntrinsicsJvmKt$1.invokeSuspend(IntrinsicsJvm.kt:205)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlin.coroutines.ContinuationKt.startCoroutine(Continuation.kt:115)
at me.him188.kotlin.jvm.blocking.bridge.internal.RunSuspendKt.$runSuspend$(RunSuspend.kt:18)
at net.mamoe.mirai.contact.Group.sendMessage(Group.kt)
at petpet-6.1.mirai2.jar//moe.dituon.petpet.mirai.MiraiPetpet.sendKeyList(MiraiPetpet.java:458)
at petpet-6.1.mirai2.jar//moe.dituon.petpet.mirai.MiraiPetpet.responseMessage(MiraiPetpet.java:190)
at petpet-6.1.mirai2.jar//moe.dituon.petpet.mirai.MiraiPetpet.onGroupMessage(MiraiPetpet.java:158)
at net.mamoe.mirai.event.EventChannel$subscribeAlways$2$1.invoke(EventChannel.kt:605)
at net.mamoe.mirai.event.EventChannel$subscribeAlways$2$1.invoke(EventChannel.kt:605)
at kotlinx.coroutines.InterruptibleKt.runInterruptibleInExpectedContext(Interruptible.kt:51)
at kotlinx.coroutines.InterruptibleKt.access$runInterruptibleInExpectedContext(Interruptible.kt:1)
at kotlinx.coroutines.InterruptibleKt$runInterruptible$2.invokeSuspend(Interruptible.kt:43)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
备注: 下为之前调试时候输出的内容
Petpet KeyList:
acclaim ( 喝彩 欢呼 )
addiction ( 上瘾 毒瘾发作 )
always ( 要我一直 )
anyasuki ( 阿尼亚 喜欢 )
applaud ( 鼓掌 )
ask ( 问问 )
bible ( 圣经 典中典 )
bite ( 啃 咬 )
bocchi ( 波奇 )
brain ( 大脑升级 妈妈生的 )
breakdown ( 惊吓 击穿 )
capoo_rub ( 咖波蹭 蹭 )
carte ( 佩可莉姆 菜单 单页 )
cast ( 丢 )
center_symmetry ( 中心对称 左上对称 )
certificate ( 喜报 )
chase_train ( 追列车 追火车 )
coupon ( 陪睡 )
cover_face ( 挡 )
crawl ( 爬 )
decent_kiss ( 抱歉 )
dinosaur ( 恐龙 小恐龙 )
distracted ( 注意力 )
divorce ( 离婚申请 离婚协议 离婚 )
dont_touch ( 不要靠近 )
door ( 开门 )
down_symmetry ( 对称 下对称 上下对称 )
eat ( 吃 )
fantasy_time ( 幻想时间 )
fencing ( 击剑 )
garbage ( 垃圾桶 垃圾 探头 )
genshin_start ( 启动 )
hammer ( 锤 )
hold_sign ( 唐可可 举牌 应援 )
interview ( 采访 )
jiujiu ( 么么 )
join ( 加入 )
karyl_point ( 指 凯露指 )
keep_away ( 远离 )
kick_ball ( 踢球 )
kirby_hammer ( 卡比锤 卡比重锤 重锤 )
kiss ( 亲 热吻 )
kita ( 喜多 展示 )
knock ( 敲 打 )
kurumi ( 胡桃 放大 )
left_down_symmetry ( 中心对称 左下对称 )
leg ( 蹭 )
like ( 永远喜欢 )
loading ( 加载 加载中 )
make_friend ( 加好友 )
marry ( 结婚 )
monad ( 唐可可 拍 单页 )
nano ( 纳米科技 )
need ( 需要 )
no_response ( 无响应 )
osu
painter ( 画 )
pat ( 拍 )
peep ( 泷奈 偷看 )
perfect ( 完美 )
petpet ( 摸 摸头 )
play ( 玩 顶 )
point_tv ( 康纳 电视 )
police ( 警察 )
potato ( 土豆 )
pound ( 捣 )
printing ( 打印 )
punch ( 打拳 )
record ( 唱片 )
remake ( 泥头车 创 重开 )
reverse ( 倒放 )
reward ( 伊蕾娜 赏金 报酬 )
right_down_symmetry ( 中心对称 右下对称 )
right_symmetry ( 对称 右对称 左右对称 )
right_up_symmetry ( 中心对称 右上对称 )
rise_dead ( 诈尸 秽土转生 )
roll ( 滚 推 )
rub ( 舔 prpr )
sad_news ( 悲报 )
safe_sense ( 安全感 )
scratch_head ( 挠头 )
screen ( 屏幕 )
show_case ( 展示 )
smash ( 砸 打碎 )
stew ( 炖 )
suck ( 吸 )
support ( 精神支柱 )
sweat ( 流汗 )
symmetry ( 对称 左对称 左右对称 )
teach ( 讲课 敲黑板 )
tear ( 撕 )
thinkwhat ( 想 )
throw ( 扔 )
thump ( 锤 )
tightly ( 黏 )
twist ( 抱 )
up_symmetry ( 对称 上对称 上下对称 )
wallpaper ( 瑞克 壁纸 )
walnutpad ( 胡桃平板 平板 )
watch_tv ( 汤姆 电视 )
worship ( 膜拜 )
yoasobi ( 群青 )
masterpiece ( 名作 )
lost_notice ( 寻狗启事 )
gluing ( 打胶 )
hold ( 举牌 应援 )
bulge ( 透镜 凸透镜 鱼眼 )
pinch ( 透镜 凹透镜 捏合 )
swirl ( 扭曲 )
acclaim ( 喝彩 欢呼 )
addiction ( 上瘾 毒瘾发作 )
always ( 要我一直 )
anyasuki ( 阿尼亚 喜欢 )
applaud ( 鼓掌 )
ask ( 问问 )
bible ( 圣经 典中典 )
bite ( 啃 咬 )
bocchi ( 波奇 )
brain ( 大脑升级 妈妈生的 )
breakdown ( 惊吓 击穿 )
capoo_rub ( 咖波蹭 蹭 )
carte ( 佩可莉姆 菜单 单页 )
cast ( 丢 )
center_symmetry ( 中心对称 左上对称 )
certificate ( 喜报 )
chase_train ( 追列车 追火车 )
coupon ( 陪睡 )
cover_face ( 挡 )
crawl ( 爬 )
decent_kiss ( 抱歉 )
dinosaur ( 恐龙 小恐龙 )
distracted ( 注意力 )
divorce ( 离婚申请 离婚协议 离婚 )
dont_touch ( 不要靠近 )
door ( 开门 )
down_symmetry ( 对称 下对称 上下对称 )
eat ( 吃 )
fantasy_time ( 幻想时间 )
fencing ( 击剑 )
garbage ( 垃圾桶 垃圾 探头 )
genshin_start ( 启动 )
hammer ( 锤 )
hold_sign ( 唐可可 举牌 应援 )
interview ( 采访 )
jiujiu ( 么么 )
join ( 加入 )
karyl_point ( 指 凯露指 )
keep_away ( 远离 )
kick_ball ( 踢球 )
kirby_hammer ( 卡比锤 卡比重锤 重锤 )
kiss ( 亲 热吻 )
kita ( 喜多 展示 )
knock ( 敲 打 )
kurumi ( 胡桃 放大 )
left_down_symmetry ( 中心对称 左下对称 )
leg ( 蹭 )
like ( 永远喜欢 )
loading ( 加载 加载中 )
make_friend ( 加好友 )
marry ( 结婚 )
monad ( 唐可可 拍 单页 )
nano ( 纳米科技 )
need ( 需要 )
no_response ( 无响应 )
osu
painter ( 画 )
pat ( 拍 )
peep ( 泷奈 偷看 )
perfect ( 完美 )
petpet ( 摸 摸头 )
play ( 玩 顶 )
point_tv ( 康纳 电视 )
police ( 警察 )
potato ( 土豆 )
pound ( 捣 )
printing ( 打印 )
punch ( 打拳 )
record ( 唱片 )
remake ( 泥头车 创 重开 )
reverse ( 倒放 )
reward ( 伊蕾娜 赏金 报酬 )
right_down_symmetry ( 中心对称 右下对称 )
right_symmetry ( 对称 右对称 左右对称 )
right_up_symmetry ( 中心对称 右上对称 )
rise_dead ( 诈尸 秽土转生 )
roll ( 滚 推 )
rub ( 舔 prpr )
sad_news ( 悲报 )
safe_sense ( 安全感 )
scratch_head ( 挠头 )
screen ( 屏幕 )
show_case ( 展示 )
smash ( 砸 打碎 )
stew ( 炖 )
suck ( 吸 )
support ( 精神支柱 )
sweat ( 流汗 )
symmetry ( 对称 左对称 左右对称 )
teach ( 讲课 敲黑板 )
tear ( 撕 )
thinkwhat ( 想 )
throw ( 扔 )
thump ( 锤 )
tightly ( 黏 )
twist ( 抱 )
up_symmetry ( 对称 上对称 上下对称 )
wallpaper ( 瑞克 壁纸 )
walnutpad ( 胡桃平板 平板 )
watch_tv ( 汤姆 电视 )
worship ( 膜拜 )
yoasobi ( 群青 )
masterpiece ( 名作 )
lost_notice ( 寻狗启事 )
gluing ( 打胶 )
hold ( 举牌 应援 )
bulge ( 透镜 凸透镜 鱼眼 )
pinch ( 透镜 凹透镜 捏合 )
swirl ( 扭曲 )
acclaim ( 喝彩 欢呼 )
addiction ( 上瘾 毒瘾发作 )
always ( 要我一直 )
anyasuki ( 阿尼亚 喜欢 )
applaud ( 鼓掌 )
ask ( 问问 )
bible ( 圣经 典中典 )
bite ( 啃 咬 )
bocchi ( 波奇 )
brain ( 大脑升级 妈妈生的 )
breakdown ( 惊吓 击穿 )
capoo_rub ( 咖波蹭 蹭 )
carte ( 佩可莉姆 菜单 单页 )
cast ( 丢 )
center_symmetry ( 中心对称 左上对称 )
certificate ( 喜报 )
chase_train ( 追列车 追火车 )
coupon ( 陪睡 )
cover_face ( 挡 )
crawl ( 爬 )
decent_kiss ( 抱歉 )
dinosaur ( 恐龙 小恐龙 )
distracted ( 注意力 )
divorce ( 离婚申请 离婚协议 离婚 )
dont_touch ( 不要靠近 )
door ( 开门 )
down_symmetry ( 对称 下对称 上下对称 )
eat ( 吃 )
fantasy_time ( 幻想时间 )
fencing ( 击剑 )
garbage ( 垃圾桶 垃圾 探头 )
genshin_start ( 启动 )
hammer ( 锤 )
hold_sign ( 唐可可 举牌 应援 )
interview ( 采访 )
jiujiu ( 么么 )
join ( 加入 )
karyl_point ( 指 凯露指 )
keep_away ( 远离 )
kick_ball ( 踢球 )
kirby_hammer ( 卡比锤 卡比重锤 重锤 )
kiss ( 亲 热吻 )
kita ( 喜多 展示 )
knock ( 敲 打 )
kurumi ( 胡桃 放大 )
left_down_symmetry ( 中心对称 左下对称 )
leg ( 蹭 )
like ( 永远喜欢 )
loading ( 加载 加载中 )
make_friend ( 加好友 )
marry ( 结婚 )
monad ( 唐可可 拍 单页 )
nano ( 纳米科技 )
need ( 需要 )
no_response ( 无响应 )
osu
painter ( 画 )
pat ( 拍 )
peep ( 泷奈 偷看 )
perfect ( 完美 )
petpet ( 摸 摸头 )
play ( 玩 顶 )
point_tv ( 康纳 电视 )
police ( 警察 )
potato ( 土豆 )
pound ( 捣 )
printing ( 打印 )
punch ( 打拳 )
record ( 唱片 )
remake ( 泥头车 创 重开 )
reverse ( 倒放 )
reward ( 伊蕾娜 赏金 报酬 )
right_down_symmetry ( 中心对称 右下对称 )
right_symmetry ( 对称 右对称 左右对称 )
right_up_symmetry ( 中心对称 右上对称 )
rise_dead ( 诈尸 秽土转生 )
roll ( 滚 推 )
rub ( 舔 prpr )
sad_news ( 悲报 )
safe_sense ( 安全感 )
scratch_head ( 挠头 )
screen ( 屏幕 )
show_case ( 展示 )
smash ( 砸 打碎 )
stew ( 炖 )
suck ( 吸 )
support ( 精神支柱 )
sweat ( 流汗 )
symmetry ( 对称 左对称 左右对称 )
teach ( 讲课 敲黑板 )
tear ( 撕 )
thinkwhat ( 想 )
throw ( 扔 )
thump ( 锤 )
tightly ( 黏 )
twist ( 抱 )
up_symmetry ( 对称 上对称 上下对称 )
wallpaper ( 瑞克 壁纸 )
walnutpad ( 胡桃平板 平板 )
watch_tv ( 汤姆 电视 )
worship ( 膜拜 )
yoasobi ( 群青 )
masterpiece ( 名作 )
lost_notice ( 寻狗启事 )
gluing ( 打胶 )
hold ( 举牌 应援 )
bulge ( 透镜 凸透镜 鱼眼 )
pinch ( 透镜 凹透镜 捏合 )
swirl ( 扭曲 )
acclaim ( 喝彩 欢呼 )
addiction ( 上瘾 毒瘾发作 )
always ( 要我一直 )
anyasuki ( 阿尼亚 喜欢 )
applaud ( 鼓掌 )
ask ( 问问 )
bible ( 圣经 典中典 )
bite ( 啃 咬 )
bocchi ( 波奇 )
brain ( 大脑升级 妈妈生的 )
breakdown ( 惊吓 击穿 )
capoo_rub ( 咖波蹭 蹭 )
carte ( 佩可莉姆 菜单 单页 )
cast ( 丢 )
center_symmetry ( 中心对称 左上对称 )
certificate ( 喜报 )
chase_train ( 追列车 追火车 )
coupon ( 陪睡 )
cover_face ( 挡 )
crawl ( 爬 )
decent_kiss ( 抱歉 )
dinosaur ( 恐龙 小恐龙 )
distracted ( 注意力 )
divorce ( 离婚申请 离婚协议 离婚 )
dont_touch ( 不要靠近 )
door ( 开门 )
down_symmetry ( 对称 下对称 上下对称 )
eat ( 吃 )
fantasy_time ( 幻想时间 )
fencing ( 击剑 )
garbage ( 垃圾桶 垃圾 探头 )
genshin_start ( 启动 )
hammer ( 锤 )
hold_sign ( 唐可可 举牌 应援 )
interview ( 采访 )
jiujiu ( 么么 )
join ( 加入 )
karyl_point ( 指 凯露指 )
keep_away ( 远离 )
kick_ball ( 踢球 )
kirby_hammer ( 卡比锤 卡比重锤 重锤 )
kiss ( 亲 热吻 )
kita ( 喜多 展示 )
knock ( 敲 打 )
kurumi ( 胡桃 放大 )
left_down_symmetry ( 中心对称 左下对称 )
leg ( 蹭 )
like ( 永远喜欢 )
loading ( 加载 加载中 )
make_friend ( 加好友 )
marry ( 结婚 )
monad ( 唐可可 拍 单页 )
nano ( 纳米科技 )
need ( 需要 )
no_response ( 无响应 )
osu
painter ( 画 )
pat ( 拍 )
peep ( 泷奈 偷看 )
perfect ( 完美 )
petpet ( 摸 摸头 )
play ( 玩 顶 )
point_tv ( 康纳 电视 )
police ( 警察 )
potato ( 土豆 )
pound ( 捣 )
printing ( 打印 )
punch ( 打拳 )
record ( 唱片 )
remake ( 泥头车 创 重开 )
reverse ( 倒放 )
reward ( 伊蕾娜 赏金 报酬 )
right_down_symmetry ( 中心对称 右下对称 )
right_symmetry ( 对称 右对称 左右对称 )
right_up_symmetry ( 中心对称 右上对称 )
rise_dead ( 诈尸 秽土转生 )
roll ( 滚 推 )
rub ( 舔 prpr )
sad_news ( 悲报 )
safe_sense ( 安全感 )
scratch_head ( 挠头 )
screen ( 屏幕 )
show_case ( 展示 )
smash ( 砸 打碎 )
stew ( 炖 )
suck ( 吸 )
support ( 精神支柱 )
sweat ( 流汗 )
symmetry ( 对称 左对称 左右对称 )
teach ( 讲课 敲黑板 )
tear ( 撕 )
thinkwhat ( 想 )
throw ( 扔 )
thump ( 锤 )
tightly ( 黏 )
twist ( 抱 )
up_symmetry ( 对称 上对称 上下对称 )
wallpaper ( 瑞克 壁纸 )
walnutpad ( 胡桃平板 平板 )
watch_tv ( 汤姆 电视 )
worship ( 膜拜 )
yoasobi ( 群青 )
masterpiece ( 名作 )
lost_notice ( 寻狗启事 )
gluing ( 打胶 )
hold ( 举牌 应援 )
bulge ( 透镜 凸透镜 鱼眼 )
pinch ( 透镜 凹透镜 捏合 )
swirl ( 扭曲 )
acclaim ( 喝彩 欢呼 )
addiction ( 上瘾 毒瘾发作 )
always ( 要我一直 )
anyasuki ( 阿尼亚 喜欢 )
applaud ( 鼓掌 )
ask ( 问问 )
bible ( 圣经 典中典 )
bite ( 啃 咬 )
bocchi ( 波奇 )
brain ( 大脑升级 妈妈生的 )
breakdown ( 惊吓 击穿 )
capoo_rub ( 咖波蹭 蹭 )
carte ( 佩可莉姆 菜单 单页 )
cast ( 丢 )
center_symmetry ( 中心对称 左上对称 )
certificate ( 喜报 )
chase_train ( 追列车 追火车 )
coupon ( 陪睡 )
cover_face ( 挡 )
crawl ( 爬 )
decent_kiss ( 抱歉 )
dinosaur ( 恐龙 小恐龙 )
distracted ( 注意力 )
divorce ( 离婚申请 离婚协议 离婚 )
dont_touch ( 不要靠近 )
door ( 开门 )
down_symmetry ( 对称 下对称 上下对称 )
eat ( 吃 )
fantasy_time ( 幻想时间 )
fencing ( 击剑 )
garbage ( 垃圾桶 垃圾 探头 )
genshin_start ( 启动 )
hammer ( 锤 )
hold_sign ( 唐可可 举牌 应援 )
interview ( 采访 )
jiujiu ( 么么 )
join ( 加入 )
karyl_point ( 指 凯露指 )
keep_away ( 远离 )
kick_ball ( 踢球 )
kirby_hammer ( 卡比锤 卡比重锤 重锤 )
kiss ( 亲 热吻 )
kita ( 喜多 展示 )
knock ( 敲 打 )
kurumi ( 胡桃 放大 )
left_down_symmetry ( 中心对称 左下对称 )
leg ( 蹭 )
like ( 永远喜欢 )
loading ( 加载 加载中 )
make_friend ( 加好友 )
marry ( 结婚 )
monad ( 唐可可 拍 单页 )
nano ( 纳米科技 )
need ( 需要 )
no_response ( 无响应 )
osu
painter ( 画 )
pat ( 拍 )
peep ( 泷奈 偷看 )
perfect ( 完美 )
petpet ( 摸 摸头 )
play ( 玩 顶 )
point_tv ( 康纳 电视 )
police ( 警察 )
potato ( 土豆 )
pound ( 捣 )
printing ( 打印 )
punch ( 打拳 )
record ( 唱片 )
remake ( 泥头车 创 重开 )
reverse ( 倒放 )
reward ( 伊蕾娜 赏金 报酬 )
right_down_symmetry ( 中心对称 右下对称 )
right_symmetry ( 对称 右对称 左右对称 )
right_up_symmetry ( 中心对称 右上对称 )
rise_dead ( 诈尸 秽土转生 )
roll ( 滚 推 )
rub ( 舔 prpr )
sad_news ( 悲报 )
safe_sense ( 安全感 )
scratch_head ( 挠头 )
screen ( 屏幕 )
show_case ( 展示 )
smash ( 砸 打碎 )
stew ( 炖 )
suck ( 吸 )
support ( 精神支柱 )
sweat ( 流汗 )
symmetry ( 对称 左对称 左右对称 )
teach ( 讲课 敲黑板 )
tear ( 撕 )
thinkwhat ( 想 )
throw ( 扔 )
thump ( 锤 )
tightly ( 黏 )
twist ( 抱 )
up_symmetry ( 对称 上对称 上下对称 )
wallpaper ( 瑞克 壁纸 )
walnutpad ( 胡桃平板 平板 )
watch_tv ( 汤姆 电视 )
worship ( 膜拜 )
yoasobi ( 群青 )
masterpiece ( 名作 )
lost_notice ( 寻狗启事 )
gluing ( 打胶 )
hold ( 举牌 应援 )
bulge ( 透镜 凸透镜 鱼眼 )
pinch ( 透镜 凹透镜 捏合 )
swirl ( 扭曲 )
eat_earth ( 啃地球 )
// PetHttpHandler.java
String query = httpExchange.getRequestURI().getQuery();
...
CommandParser parser = new CommandParser(query);
httpExchange.getRequestURI().getQuery()
returns The decoded query component of this URI
// CommandParser.java
public CommandParser(String command) {
String[] queryList = command.split("&");
for (String query : queryList) {
String[] parameter = query.split("=");
parameterList.put(parameter[0], parameter[1]);
}
parser();
}
If fromAvatar
parameter like this http://some.thing/test?a=1&b=3
, the parameter in fromAvatar itself (a=1&b=3
) will be treated as a seprate parameter in parameterList. That will make the wrong fromAvatar
parameter(http://some.thing/test?a
).
Maybe use httpExchange.getRequestURI().getRawQuery()
and decode string in CommandParser
constructor after "=" spliting is better
如题,或许将配置文件置于Mirai/config/xmmn.dituon.Petpet
目录下,图片资源置于Mirai/data/xmmn.dituon.Petpet
目录下更为合适。
RT
用配置文件禁用的群聊仍然可以使用插件
配置文件里的格式为:
disabledGroups: [群号]
此外试着使用下面这几个权限指令后发现也无法禁用
/perm cancel * xmmt.dituon.petpet:*
/perm cancel g群号 xmmt.dituon.petpet:*
/perm permit m群号.* xmmt.dituon.petpet:*
然后已知群主/管理可以使用 pet on/off 可以启用/禁用 戳一戳
感觉可以再添加一个 petpet on/off 在该群启用/禁用插件所有功能
这个在我的群晖和CentOS 7的机器都有,但是在MacOS就没有
2023-03-01 16:51:08 I/stdout: Petpet GifMakerThreadPoolSize: 5
2023-03-01 16:51:08 I/stdout: ヾ(≧▽≦*)o Petpet 初始化成功,使用 pet 以获取keyList!
Fontconfig error: Cannot load default config file
2023-03-01 16:51:09 E/PetPet: java.lang.InternalError: java.lang.reflect.InvocationTargetException
java.lang.InternalError: java.lang.reflect.InvocationTargetException
at java.desktop/sun.font.FontManagerFactory$1.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at java.desktop/sun.font.FontManagerFactory.getInstance(Unknown Source)
at java.desktop/java.awt.Font.(Unknown Source)
at java.desktop/java.awt.Font.createFont(Unknown Source)
at petpet-5.3.mirai2.jar//moe.dituon.petpet.share.BasePetService.registerFontsToAwt(BasePetService.java:156)
at petpet-5.3.mirai2.jar//moe.dituon.petpet.share.BasePetService.readData(BasePetService.java:54)
at petpet-5.3.mirai2.jar//moe.dituon.petpet.plugin.PluginPetService.readData(PluginPetService.java:59)
at petpet-5.3.mirai2.jar//moe.dituon.petpet.mirai.MiraiPetService.readData(MiraiPetService.java:86)
at petpet-5.3.mirai2.jar//moe.dituon.petpet.mirai.MiraiPetpet.onEnable(MiraiPetpet.java:57)
at net.mamoe.mirai.console.internal.plugin.JvmPluginInternal.internalOnEnable$mirai_console(JvmPluginInternal.kt:232)
at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.enable(BuiltInJvmPluginLoaderImpl.kt:305)
at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.enable(BuiltInJvmPluginLoaderImpl.kt:35)
at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt)
at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt:50)
at net.mamoe.mirai.console.plugin.PluginManager.enablePlugin(PluginManager.kt:173)
at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.enableAllLoadedPlugins$mirai_console(PluginManagerImpl.kt:181)
at net.mamoe.mirai.console.internal.MiraiConsoleImplementationBridge.doStart$mirai_console(MiraiConsoleImplementationBridge.kt:347)
at net.mamoe.mirai.console.MiraiConsoleImplementation$Companion.start(MiraiConsoleImplementation.kt:496)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon(MiraiConsoleTerminalLoader.kt:177)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon$default(MiraiConsoleTerminalLoader.kt:176)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.main(MiraiConsoleTerminalLoader.kt:54)
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 org.itxtech.mcl.Utility.bootJars(Utility.java:86)
at org.itxtech.mcl.Utility.bootJars(Utility.java:76)
at org.itxtech.mcl.Utility.bootMirai(Utility.java:98)
at org.itxtech.mcl.module.builtin.Boot.boot(Boot.java:113)
at org.itxtech.mcl.module.ModuleManager.phaseBoot(ModuleManager.java:123)
at org.itxtech.mcl.Loader.lambda$start$4(Loader.java:196)
at org.itxtech.mcl.Loader.tryCatching(Loader.java:151)
at org.itxtech.mcl.Loader.start(Loader.java:196)
at org.itxtech.mcl.Loader.main(Loader.java:84)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
... 35 more
Caused by: java.lang.NullPointerException: Cannot load from short array because "sun.awt.FontConfiguration.head" is null
at java.desktop/sun.awt.FontConfiguration.getVersion(Unknown Source)
at java.desktop/sun.awt.FontConfiguration.readFontConfigFile(Unknown Source)
at java.desktop/sun.awt.FontConfiguration.init(Unknown Source)
at java.desktop/sun.awt.X11FontManager.createFontConfiguration(Unknown Source)
at java.desktop/sun.font.SunFontManager$2.run(Unknown Source)
at java.desktop/sun.font.SunFontManager$2.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at java.desktop/sun.font.SunFontManager.(Unknown Source)
at java.desktop/sun.awt.FcFontManager.(Unknown Source)
at java.desktop/sun.awt.X11FontManager.(Unknown Source)
... 40 more
在线编辑器大大简化了表情包的制作,但是在使用Deform进行变形的时候看不到图片变成了什么样。
请问能否增加个开关在进行Deform的时候选择显示图片还是粉色框。
希望可以让图在底层的同时字在顶层
"推"(生成一个人推雪球那个)生成的gif一闪一闪的, 转不起来
填成 ‘ ’ 后虽然不会冷却回复,但是几乎每一条不回复的都会报错
貌似是更新4.9后才出现的,挂梯子也不行,资源链接能正常打开
2022-10-13 16:45:04 I/stdout: 无法连接到远程资源: https://raw.githubusercontent.com/Dituon/petpet/main/index.json
2022-10-13 16:45:04 W/stderr: Exception in thread "Thread-12" java.lang.NullPointerException
2022-10-13 16:45:04 W/stderr: at java.base/java.util.Objects.requireNonNull(Objects.java:208)
2022-10-13 16:45:04 W/stderr: at petpet-4.9.mirai2.jar//xmmt.dituon.plugin.DataUpdater.checkUpdate(DataUpdater.java:63)
2022-10-13 16:45:04 W/stderr: at petpet-4.9.mirai2.jar//xmmt.dituon.plugin.DataUpdater.autoUpdate(DataUpdater.java:21)
2022-10-13 16:45:04 W/stderr: at java.base/java.lang.Thread.run(Thread.java:833)
2022-06-03 18:35:03 E/PetPet: java.lang.NoClassDefFoundError: net/mamoe/mirai/console/data/java/JavaAutoSavePluginConfig
java.lang.NoClassDefFoundError: net/mamoe/mirai/console/data/java/JavaAutoSavePluginConfig
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(Unknown Source)
at java.base/java.security.SecureClassLoader.defineClass(Unknown Source)
at java.base/java.net.URLClassLoader.defineClass(Unknown Source)
at java.base/java.net.URLClassLoader$1.run(Unknown Source)
at java.base/java.net.URLClassLoader$1.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.net.URLClassLoader.findClass(Unknown Source)
at net.mamoe.mirai.console.internal.plugin.JvmPluginClassLoader.findClass$mirai_console(JvmPluginClassLoader.kt:102)
at net.mamoe.mirai.console.internal.plugin.JvmPluginClassLoader.findClass(JvmPluginClassLoader.kt:51)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at xmmt.dituon.plugin.Petpet.onEnable(Petpet.java:34)
at net.mamoe.mirai.console.internal.plugin.JvmPluginInternal.internalOnEnable$mirai_console(JvmPluginInternal.kt:117)
at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.enable(BuiltInJvmPluginLoaderImpl.kt:164)
at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.enable(BuiltInJvmPluginLoaderImpl.kt:36)
at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt)
at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt:47)
at net.mamoe.mirai.console.plugin.PluginManager.enablePlugin(PluginManager.kt:135)
at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.enableAllLoadedPlugins$mirai_console(PluginManagerImpl.kt:177)
at net.mamoe.mirai.console.internal.MiraiConsoleImplementationBridge.doStart$mirai_console(MiraiConsoleImplementationBridge.kt:202)
at net.mamoe.mirai.console.MiraiConsoleImplementation$Companion.start(MiraiConsoleImplementation.kt:392)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon(MiraiConsoleTerminalLoader.kt:156)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon$default(MiraiConsoleTerminalLoader.kt:155)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.main(MiraiConsoleTerminalLoader.kt:47)
Caused by: java.lang.ClassNotFoundException: net.mamoe.mirai.console.data.java.JavaAutoSavePluginConfig
at net.mamoe.mirai.console.internal.plugin.JvmPluginClassLoader.findClass$mirai_console(JvmPluginClassLoader.kt:110)
at net.mamoe.mirai.console.internal.plugin.JvmPluginClassLoader.findClass(JvmPluginClassLoader.kt:51)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 25 more
2022-05-24 13:46:44 W/stderr: javax.imageio.IIOException: Can't read input file!
2022-05-24 13:46:44 W/stderr: at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1310)
2022-05-24 13:46:44 W/stderr: at petpet-1.2.jar//xmmt.dituon.ImageSynthesis.sendImage(ImageSynthesis.java:20)
2022-05-24 13:46:44 W/stderr: at petpet-1.2.jar//xmmt.dituon.Petpet.makeImage(Petpet.java:153)
2022-05-24 13:46:44 W/stderr: at petpet-1.2.jar//xmmt.dituon.Petpet.onGroupMessage(Petpet.java:71)
2022-05-24 13:46:44 W/stderr: at net.mamoe.mirai.event.EventChannel$subscribeAlways$2$1.invoke(EventChannel.kt:574)
2022-05-24 13:46:44 W/stderr: at net.mamoe.mirai.event.EventChannel$subscribeAlways$2$1.invoke(EventChannel.kt:574)
2022-05-24 13:46:44 W/stderr: at kotlinx.coroutines.InterruptibleKt.runInterruptibleInExpectedContext(Interruptible.kt:51)
2022-05-24 13:46:44 W/stderr: at kotlinx.coroutines.InterruptibleKt.access$runInterruptibleInExpectedContext(Interruptible.kt:1)
2022-05-24 13:46:44 W/stderr: at kotlinx.coroutines.InterruptibleKt$runInterruptible$2.invokeSuspend(Interruptible.kt:43)
2022-05-24 13:46:44 W/stderr: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
2022-05-24 13:46:44 W/stderr: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
2022-05-24 13:46:44 W/stderr: at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
2022-05-24 13:46:44 W/stderr: at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
2022-05-24 13:46:44 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
2022-05-24 13:46:44 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749)
2022-05-24 13:46:44 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
2022-05-24 13:46:44 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
2022-05-24 13:46:44 E/main: Exception in coroutine <unnamed>
java.lang.NullPointerException
at java.base/java.util.Objects.requireNonNull(Objects.java:208)
at petpet-1.2.jar//xmmt.dituon.Petpet.makeImage(Petpet.java:152)
at petpet-1.2.jar//xmmt.dituon.Petpet.onGroupMessage(Petpet.java:71)
at net.mamoe.mirai.event.EventChannel$subscribeAlways$2$1.invoke(EventChannel.kt:574)
at net.mamoe.mirai.event.EventChannel$subscribeAlways$2$1.invoke(EventChannel.kt:574)
at kotlinx.coroutines.InterruptibleKt.runInterruptibleInExpectedContext(Interruptible.kt:51)
at kotlinx.coroutines.InterruptibleKt.access$runInterruptibleInExpectedContext(Interruptible.kt:1)
at kotlinx.coroutines.InterruptibleKt$runInterruptible$2.invokeSuspend(Interruptible.kt:43)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
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)
群友太爱用了 一次要处理好几个动图 自己电脑挂bot实在遭不住了 希望加个冷却 比如一分钟只接受一个指令这样的
编辑器已经实现的是上传图片所有帧共用已添加的头像坐标,这样合适静态图片或者不需要头像坐标频繁变化的GIF图片,
但是如果编辑一些有些需要头像位置频繁移动的gif时,效果就不会很好(例如petpet已有的fencing击剑)。
所以有了分别保存GIF图片每一帧已有头像坐标这个想法。
非常感谢大佬
辛苦了
不清楚是不是单独这个插件的问题,以下是报错信息
2022-11-13 21:22:50 W/Bot.1992588307: An exception occurred when processing event. Subscriber scope: ''. Broadcaster scope: 'Bot 1992588307.EventDispatcher'
java.lang.IllegalStateException: Send message failed: MessageSvcPbSendMsg.Response.Failed(resultType=46, errorCode=0, errorMessage=)
at net.mamoe.mirai.internal.message.protocol.impl.GeneralMessageSenderProtocol$GeneralMessageSender.sendSinglePacket(GeneralMessageSenderProtocol.kt:150)
at net.mamoe.mirai.internal.message.protocol.impl.GeneralMessageSenderProtocol$GeneralMessageSender.access$sendSinglePacket(GeneralMessageSenderProtocol.kt:50)
at net.mamoe.mirai.internal.message.protocol.impl.GeneralMessageSenderProtocol$GeneralMessageSender$sendSinglePacket$1.invokeSuspend(GeneralMessageSenderProtocol.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:33)
at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:178)
at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:166)
at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:397)
at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:431)
at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:420)
at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:328)
at kotlinx.coroutines.ResumeAwaitOnCompletion.invoke(JobSupport.kt:1413)
at kotlinx.coroutines.JobSupport.completeStateFinalization(JobSupport.kt:318)
at kotlinx.coroutines.JobSupport.tryFinalizeSimpleState(JobSupport.kt:295)
at kotlinx.coroutines.JobSupport.tryMakeCompleting(JobSupport.kt:856)
at kotlinx.coroutines.JobSupport.makeCompleting$kotlinx_coroutines_core(JobSupport.kt:806)
at kotlinx.coroutines.CompletableDeferredImpl.complete(CompletableDeferred.kt:92)
at net.mamoe.mirai.internal.network.handler.NetworkHandlerSupport.collectReceived$mirai_core(NetworkHandlerSupport.kt:102)
at net.mamoe.mirai.internal.network.handler.CommonNetworkHandler$PacketDecodePipeline.processBody(CommonNetworkHandler.kt:160)
at net.mamoe.mirai.internal.network.handler.CommonNetworkHandler$PacketDecodePipeline.access$processBody(CommonNetworkHandler.kt:102)
at net.mamoe.mirai.internal.network.handler.CommonNetworkHandler$PacketDecodePipeline$1$3$1.invokeSuspend(CommonNetworkHandler.kt:126)
at net.mamoe.mirai.internal.network.handler.CommonNetworkHandler$PacketDecodePipeline$1$3$1.invoke(CommonNetworkHandler.kt)
at net.mamoe.mirai.internal.network.handler.CommonNetworkHandler$PacketDecodePipeline$1$3$1.invoke(CommonNetworkHandler.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.CommonNetworkHandler$PacketDecodePipeline$1.invokeSuspend(CommonNetworkHandler.kt:126)
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.base/java.lang.Thread.run(Unknown Source)
希望关键词检测可以对应文件夹名称触发 比如 素材文件夹内 文件夹名为摸 (触发关键词 : 摸 @ xxx)
希望可以支持获取动态头像,动态图生成可以兼容透明背景
感觉bot被戳然后自己发攻击自己的gif有点笨 希望增加一个可选项
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.