突发奇想想跟bot斗图,所以就想办法教教他
看了日志,收到QQ收藏夹的表情包,日志会包含gchat.qpic.cn,所以就直接检索消息关键词
①如果有qpic就鉴定为表情就开始
②循环检索库存是否有重名的表情 (单纯根据表情链接是否一样,如果群里人多每个人发一遍可能会爆炸),实际上并不行,只有/0?前面的那一部分是表情包代码,其他的会变的。所以改成只检索那一部分,这个真不会,只好堆了一大堆(能用就行)
③没有重复的话就收入库存
④每次收到表情都会从库存随机发一个表情出来
为了方便调整加了个清空的指令 (作用域该怎么清空,我是直接从头覆盖的),查看数量和指定序号输出,方便看运行情况,分享一下代码
(有没有大佬帮忙改进)
插件名称: 表情包
导出时间: 2023/8/14 14:54:45
-=-=-=-=–=-=-=-=- BEGIN KOISHI BLOCKLY BLOCK V1 -=-=–=-=-=–=-=–=-=-=-
H4sIAAAAAAAAA+1baXOqShP+LZRaRYwLLoDEsiIKGvd9iV8sNhUXUBa3D/72tzEa
jUr0RHNu3bpvlUkQ6OmeZ3qfiYtMuILBuaTpsqrA1UvAA7+nY7MvK92j2/CD+Qhf
CP56tgSKqGr69gmecOGMdZNXxdX2znZMfqwKI/3wfcwpfZPrS83DoJjn63sw0vZV
YzWVdkwnsiiOpQWnSTvOsrh74usIYWDoK72P8rmqi2TcaxeBzaK795bbyeCUdb2V
yktsr2VlahpHYgnceMxzwuhE8MPXI2EEVTE0dax35d6pNJlhdx12BXElwUyfAoJT
0itFkCm1f++EayaF3cJwrPZloSuok+kFAApPCRwoZD/ZbPdh6km/VBG6UViM3Zs9
WRqLR0xL5R1lka3AbxDvkmj0LYIZ0tLoyoooLUtnULzzLjKZfUWCHr1W66EBr4OR
EMRGJrbI7MhSmWqtbi9Wk8432FtE0yXd0q/uBP6Cup1KB0q2rLJA1S868/7hYplK
tTyeHCzdB+8d+1RmJ9h2eH3AierCFolTHkZDe06rUm3pwtlydgpDDsMRi6Vsg0Kd
bdd3tH1hwBm+2VQWfILyKdLxxxogcQsSE84YdBVzwkvaqYT0qBksxAALhXCA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