IOTQQ -- Lua插件
直接把lua文件放入Plugins文件夹下即可食用
将文件中的其他时段的注释删除
将该文件放置任意文件夹下,并且授予777权限
然后添加定时任务,crontab -e 进入编辑模式,添加下方命令即可
0 * * * * /xxx/xxx/iotbot_3.0.1_linux_amd64/Plugins/TimeReport.sh >> /xxx/TimeReport.txt
若crontab -e失败,请自行安装cron
IOTQQ -- Lua插件
无法获取p站图片,请问这个如何实现?
我想在PicGroup.lua
内对于发送的消息进行正则匹配,源代码为
if string.find(data.Content, "来点色图") == 1 then
Pixiv(CurrentQQ,data)
end
改完之后是
if string.find(data.Content, "来(.*?)[点丶份张幅](.*?)的?(|r18)[色瑟涩][图圖]") == 1 then
Pixiv(CurrentQQ,data)
end
但是在聊天群内发送信息却没有回应,本人刚接触lua,请问这段为什么会不行?应该怎么写?
我输入: 听歌 A Promise
OPQ log.notice 输出
听歌keyWord-->APromise
url-->https://c.y.qq.com/soso/fcgi-bin/client_search_cp?ct=24&qqmusic_ver=1298&new_json=1&remoteplace=txt.yqq.song&searchid=&t=0&aggr=1&cr=1&catZhida=1&lossless=0&flag_qc=0&p=1&n=20&w=APromise
songID-->002WyOma0F5H8s
songname-->A Promise(世界顶尖的暗杀者转生为异世界贵族 ED) (翻奏: 結城アイラ)
songname>A Promise(世界顶尖的暗杀者转生为异世界贵族 ED) (翻奏: 結城アイラ)
jumpUrl>https://y.qq.com/n/yqq/song/002WyOma0F5H8s.html
pic_url>http://y.gtimg.cn/music/photo_new/T002R300x300M000002GKpkd2CYreW_1.jpg?max_age=2592000
song_url>https://ws.stream.qqmusic.qq.com/
singer>Kyle Xian
然后就没有下文了,群里并没有收到bot发出的响应。大概是"JsonMsg"那段拼接的消息无法发出,改成"TextMsg"消息可以以文本形式发出。
我测试了下,我收发XmlMsg,JsonMsg都正常。
代码可能是未转义造成的。转义过的JsonMsg应该长这样子:
{"Content":"{ \"app\": \"com.tencent.structmsg\", \"config\": { \"autosize\": true, \"ctime\": 16327123456, \"forward\": true, \"token\": \"1fb46767d7ecd7cd612e5ff84ab58272\", \"type\": \"normal\" }, \"desc\": \"音乐\", \"meta\": { \"music\": { \"action\": \"\", \"android_pkg_name\": \"\", \"app_type\": 1, \"appid\": 100489085, \"desc\": \"群星\", \"jumpUrl\": \"https:\\/\\/y.music.163.com\\/m\\/song?id=28240153\u0026uct=%2B6b00Gxbo2GAXRSMERfnMA%3D%3D\u0026app_version=8.5.30\", \"musicUrl\": \"http:\\/\\/music.163.com\\/song\\/media\\/outer\\/url?id=28240153\u0026userid=123456789\u0026sc=wm\", \"preview\": \"http:\\/\\/p3.music.126.net\\/uRPcKs8NIWTfbMjnjvMKew==\\/6047313952791851.jpg\", \"sourceMsgId\": \"0\", \"source_icon\": \"\", \"source_url\": \"\", \"tag\": \"网易云音乐\", \"title\": \"难忘今宵 (Live)\" } }, \"prompt\": \"[分享]难忘今宵 (Live)\", \"ver\": \"0.0.0.1\", \"view\": \"music\" }收到[[分享]难忘今宵 (Live)]消息,请升级QQ版本查看"}
music.lua发不了xml信息了貌似,已经发不出来音乐链接了
我把插件放到lua文件夹下,然后重新启动iotqq,发对应的消息但是没有反应,请问这个正确的使用方法是怎样的呢?大佬可以解答一下吗?
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.