diff --git a/pom.xml b/pom.xml index 5923f6b..8e49f6c 100644 --- a/pom.xml +++ b/pom.xml @@ -22,6 +22,10 @@ spring-boot-starter-itbaima-robot 1.0.2 + + + + org.springframework.boot spring-boot-starter-web @@ -36,6 +40,16 @@ org.springframework.boot spring-boot-starter-actuator + + org.mybatis.spring.boot + mybatis-spring-boot-starter + 2.2.2 + + + mysql + mysql-connector-java + 8.0.31 + diff --git a/robot-data/cache/account.secrets b/robot-data/cache/account.secrets index efb7df5..19ecf98 100644 Binary files a/robot-data/cache/account.secrets and b/robot-data/cache/account.secrets differ diff --git a/robot-data/cache/contacts/groups/1033597003.json b/robot-data/cache/contacts/groups/1033597003.json index 777d3db..368c1f1 100644 --- a/robot-data/cache/contacts/groups/1033597003.json +++ b/robot-data/cache/contacts/groups/1033597003.json @@ -11,13 +11,12 @@ "muteTimestamp": 1684289748, "anonymousId": null, "joinTimestamp": 1601451568, - "lastSpeakTimestamp": 1719026018, + "lastSpeakTimestamp": 1719206847, "isOfficialBot": false, "rank": 4, "point": 591, "honors": [ - 3, - 1 + 3 ], "temperature": 100 }, @@ -45,15 +44,16 @@ "remark": "", "nameCard": "群HR,正在招聘致命公司员工", "specialTitle": "", - "muteTimestamp": 1719023342, + "muteTimestamp": 1719111694, "anonymousId": null, "joinTimestamp": 1601451568, - "lastSpeakTimestamp": 1719025280, + "lastSpeakTimestamp": 1719206546, "isOfficialBot": false, "rank": 2, "point": 458, "honors": [ - 3 + 3, + 1 ], "temperature": 100 }, @@ -67,12 +67,12 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1695304770, - "lastSpeakTimestamp": 1718944806, + "lastSpeakTimestamp": 1719196581, "isOfficialBot": false, "rank": 1, "point": 0, "honors": [], - "temperature": 98 + "temperature": 99 }, { "uin": 1368740141, @@ -84,12 +84,12 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1671412875, - "lastSpeakTimestamp": 1719023299, + "lastSpeakTimestamp": 1719111970, "isOfficialBot": false, "rank": 1, "point": 0, "honors": [], - "temperature": 7 + "temperature": 8 }, { "uin": 1393653660, @@ -101,7 +101,7 @@ "muteTimestamp": 1639379023, "anonymousId": null, "joinTimestamp": 1636539791, - "lastSpeakTimestamp": 1719023243, + "lastSpeakTimestamp": 1719151328, "isOfficialBot": false, "rank": 1, "point": 0, @@ -120,7 +120,7 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1601451568, - "lastSpeakTimestamp": 1719022685, + "lastSpeakTimestamp": 1719201483, "isOfficialBot": false, "rank": 2, "point": 118, diff --git a/robot-data/cache/contacts/groups/367730983.json b/robot-data/cache/contacts/groups/367730983.json index 46dc70d..14f9550 100644 --- a/robot-data/cache/contacts/groups/367730983.json +++ b/robot-data/cache/contacts/groups/367730983.json @@ -861,14 +861,12 @@ "muteTimestamp": 1657543011, "anonymousId": null, "joinTimestamp": 1516716532, - "lastSpeakTimestamp": 1718984789, + "lastSpeakTimestamp": 1719208591, "isOfficialBot": false, "rank": 3, "point": 413, "honors": [ - 6, - 3, - 1 + 3 ], "temperature": 100 }, @@ -1001,12 +999,12 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1709979970, - "lastSpeakTimestamp": 1718715480, + "lastSpeakTimestamp": 1719051666, "isOfficialBot": false, "rank": 1, "point": 0, "honors": [], - "temperature": 10 + "temperature": 11 }, { "uin": 262226898, @@ -1987,7 +1985,7 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1567785453, - "lastSpeakTimestamp": 1716818237, + "lastSpeakTimestamp": 1719044760, "isOfficialBot": false, "rank": 3, "point": 631, @@ -2038,7 +2036,7 @@ "muteTimestamp": 1512490327, "anonymousId": null, "joinTimestamp": 1507039120, - "lastSpeakTimestamp": 1718075045, + "lastSpeakTimestamp": 1719146548, "isOfficialBot": false, "rank": 4, "point": 2648, @@ -2531,7 +2529,7 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1656414450, - "lastSpeakTimestamp": 1718988622, + "lastSpeakTimestamp": 1719141814, "isOfficialBot": false, "rank": 1, "point": 0, @@ -2684,7 +2682,7 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1516540636, - "lastSpeakTimestamp": 1718963950, + "lastSpeakTimestamp": 1719113988, "isOfficialBot": false, "rank": 1, "point": 0, @@ -3198,9 +3196,7 @@ "isOfficialBot": false, "rank": 3, "point": 998, - "honors": [ - 2 - ], + "honors": [], "temperature": 100 }, { @@ -3604,7 +3600,7 @@ "muteTimestamp": 1591438758, "anonymousId": null, "joinTimestamp": 1541613443, - "lastSpeakTimestamp": 1718804978, + "lastSpeakTimestamp": 1719148529, "isOfficialBot": false, "rank": 4, "point": 1234, @@ -4097,7 +4093,7 @@ "muteTimestamp": 1710052096, "anonymousId": null, "joinTimestamp": 1542464320, - "lastSpeakTimestamp": 1719026183, + "lastSpeakTimestamp": 1719208584, "isOfficialBot": false, "rank": 6, "point": 6366, @@ -4371,7 +4367,7 @@ "muteTimestamp": 1710895246, "anonymousId": null, "joinTimestamp": 1559218053, - "lastSpeakTimestamp": 1719022972, + "lastSpeakTimestamp": 1719046936, "isOfficialBot": false, "rank": 4, "point": 1922, @@ -4609,7 +4605,7 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1585996377, - "lastSpeakTimestamp": 1718960956, + "lastSpeakTimestamp": 1719147219, "isOfficialBot": false, "rank": 1, "point": 0, @@ -4864,7 +4860,7 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1510393439, - "lastSpeakTimestamp": 1719026118, + "lastSpeakTimestamp": 1719208600, "isOfficialBot": false, "rank": 5, "point": 5071, @@ -4873,7 +4869,7 @@ }, { "uin": 1537007901, - "nick": "蜂蜜柚子茶", + "nick": "艾鼬-Anyo", "permission": "MEMBER", "remark": "", "nameCard": "ฅ|猫柚|ฅ", @@ -5068,13 +5064,11 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1611643325, - "lastSpeakTimestamp": 1718962799, + "lastSpeakTimestamp": 1719162171, "isOfficialBot": false, "rank": 3, "point": 467, - "honors": [ - 2 - ], + "honors": [], "temperature": 100 }, { @@ -5155,14 +5149,15 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1716826482, - "lastSpeakTimestamp": 1719026608, + "lastSpeakTimestamp": 1719148476, "isOfficialBot": false, "rank": 1, "point": 0, "honors": [ - 2 + 2, + 1 ], - "temperature": 21 + "temperature": 22 }, { "uin": 1761995793, @@ -5174,7 +5169,7 @@ "muteTimestamp": 1716476389, "anonymousId": null, "joinTimestamp": 1670166779, - "lastSpeakTimestamp": 1718979972, + "lastSpeakTimestamp": 1719149902, "isOfficialBot": false, "rank": 1, "point": 0, @@ -5380,7 +5375,7 @@ "muteTimestamp": 1512300643, "anonymousId": null, "joinTimestamp": 1511616542, - "lastSpeakTimestamp": 1717738517, + "lastSpeakTimestamp": 1719032154, "isOfficialBot": false, "rank": 5, "point": 3982, @@ -5397,7 +5392,7 @@ "muteTimestamp": 1596078538, "anonymousId": null, "joinTimestamp": 1550326032, - "lastSpeakTimestamp": 1718965192, + "lastSpeakTimestamp": 1719052731, "isOfficialBot": false, "rank": 4, "point": 2732, @@ -5431,7 +5426,7 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1681196241, - "lastSpeakTimestamp": 1718614151, + "lastSpeakTimestamp": 1719136679, "isOfficialBot": false, "rank": 1, "point": 0, @@ -5839,7 +5834,7 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1589981357, - "lastSpeakTimestamp": 1718555487, + "lastSpeakTimestamp": 1719029636, "isOfficialBot": false, "rank": 1, "point": 0, @@ -6094,7 +6089,7 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1713005255, - "lastSpeakTimestamp": 1718710972, + "lastSpeakTimestamp": 1719049139, "isOfficialBot": false, "rank": 1, "point": 0, @@ -6417,7 +6412,7 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1563018932, - "lastSpeakTimestamp": 1718959376, + "lastSpeakTimestamp": 1719140327, "isOfficialBot": false, "rank": 4, "point": 1146, @@ -6553,12 +6548,12 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1705648819, - "lastSpeakTimestamp": 1719024712, + "lastSpeakTimestamp": 1719207829, "isOfficialBot": false, "rank": 1, "point": 0, "honors": [], - "temperature": 69 + "temperature": 70 }, { "uin": 2642400645, @@ -6842,7 +6837,7 @@ "muteTimestamp": 1709638075, "anonymousId": null, "joinTimestamp": 1558779352, - "lastSpeakTimestamp": 1718990012, + "lastSpeakTimestamp": 1719205827, "isOfficialBot": false, "rank": 5, "point": 5779, @@ -6946,14 +6941,14 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1653323510, - "lastSpeakTimestamp": 1718937894, + "lastSpeakTimestamp": 1719206215, "isOfficialBot": false, "rank": 1, "point": 0, "honors": [ 2 ], - "temperature": 75 + "temperature": 76 }, { "uin": 2900633017, @@ -7059,20 +7054,20 @@ }, { "uin": 2952358252, - "nick": "乌里扬诺夫", + "nick": "听雨", "permission": "MEMBER", - "remark": "乌里扬诺夫", + "remark": "听雨", "nameCard": "", "specialTitle": "", "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1714398064, - "lastSpeakTimestamp": 1718971946, + "lastSpeakTimestamp": 1719148194, "isOfficialBot": false, "rank": 1, "point": 0, "honors": [], - "temperature": 15 + "temperature": 17 }, { "uin": 2963436468, diff --git a/robot-data/cache/contacts/groups/518909220.json b/robot-data/cache/contacts/groups/518909220.json index 347814e..ff7e8f7 100644 --- a/robot-data/cache/contacts/groups/518909220.json +++ b/robot-data/cache/contacts/groups/518909220.json @@ -25,10 +25,10 @@ "remark": "神明啊把我变成小萝莉吧お願い", "nameCard": "", "specialTitle": "", - "muteTimestamp": 1719061513, + "muteTimestamp": 1719111687, "anonymousId": null, "joinTimestamp": 1505138309, - "lastSpeakTimestamp": 1719070423, + "lastSpeakTimestamp": 1719198563, "isOfficialBot": false, "rank": 2, "point": 5, @@ -48,12 +48,12 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1719075883, - "lastSpeakTimestamp": 1719075883, + "lastSpeakTimestamp": 1719198573, "isOfficialBot": false, "rank": 1, "point": 0, "honors": [], - "temperature": 0 + "temperature": 3 }, { "uin": 1368740141, @@ -65,12 +65,12 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1524301027, - "lastSpeakTimestamp": 1719028279, + "lastSpeakTimestamp": 1719156412, "isOfficialBot": false, "rank": 1, "point": 0, "honors": [], - "temperature": 12 + "temperature": 13 }, { "uin": 2821090336, @@ -82,12 +82,12 @@ "muteTimestamp": 1719070735, "anonymousId": null, "joinTimestamp": 1718900409, - "lastSpeakTimestamp": 1719074322, + "lastSpeakTimestamp": 1719198576, "isOfficialBot": false, "rank": 1, "point": 0, "honors": [], - "temperature": 4 + "temperature": 5 } ] } \ No newline at end of file diff --git a/robot-data/cache/contacts/groups/605850412.json b/robot-data/cache/contacts/groups/605850412.json index 65ddf13..bd683e5 100644 --- a/robot-data/cache/contacts/groups/605850412.json +++ b/robot-data/cache/contacts/groups/605850412.json @@ -45,7 +45,7 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1490652159, - "lastSpeakTimestamp": 1718932336, + "lastSpeakTimestamp": 1719138577, "isOfficialBot": false, "rank": 2, "point": 1409, @@ -198,7 +198,7 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1490923635, - "lastSpeakTimestamp": 1719022546, + "lastSpeakTimestamp": 1719210688, "isOfficialBot": false, "rank": 4, "point": 9048, @@ -438,7 +438,7 @@ "muteTimestamp": 1518845533, "anonymousId": null, "joinTimestamp": 1490880389, - "lastSpeakTimestamp": 1719021816, + "lastSpeakTimestamp": 1719199322, "isOfficialBot": false, "rank": 5, "point": 9288, @@ -644,7 +644,7 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1631510645, - "lastSpeakTimestamp": 1718860372, + "lastSpeakTimestamp": 1719033503, "isOfficialBot": false, "rank": 1, "point": 0, @@ -729,12 +729,12 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1491116695, - "lastSpeakTimestamp": 1718274573, + "lastSpeakTimestamp": 1719157516, "isOfficialBot": false, "rank": 2, "point": 13, "honors": [], - "temperature": 30 + "temperature": 31 }, { "uin": 1012834568, @@ -899,7 +899,7 @@ "muteTimestamp": 1615199862, "anonymousId": null, "joinTimestamp": 1490966393, - "lastSpeakTimestamp": 1719021908, + "lastSpeakTimestamp": 1719211900, "isOfficialBot": false, "rank": 4, "point": 6960, @@ -1191,7 +1191,7 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1490973282, - "lastSpeakTimestamp": 1719024534, + "lastSpeakTimestamp": 1719211351, "isOfficialBot": false, "rank": 2, "point": 189, @@ -1210,7 +1210,7 @@ "muteTimestamp": 1553354879, "anonymousId": null, "joinTimestamp": 1525768915, - "lastSpeakTimestamp": 1718991050, + "lastSpeakTimestamp": 1719163195, "isOfficialBot": false, "rank": 4, "point": 7025, @@ -1246,7 +1246,7 @@ "muteTimestamp": 1608442575, "anonymousId": null, "joinTimestamp": 1490667181, - "lastSpeakTimestamp": 1718981810, + "lastSpeakTimestamp": 1719211859, "isOfficialBot": false, "rank": 4, "point": 9131, @@ -1384,7 +1384,7 @@ "muteTimestamp": 1586432529, "anonymousId": null, "joinTimestamp": 1490943299, - "lastSpeakTimestamp": 1718960087, + "lastSpeakTimestamp": 1719158030, "isOfficialBot": false, "rank": 3, "point": 6723, @@ -1707,7 +1707,7 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1532449729, - "lastSpeakTimestamp": 1719022619, + "lastSpeakTimestamp": 1719211189, "isOfficialBot": false, "rank": 3, "point": 4954, diff --git a/robot-data/cache/contacts/groups/645541117.json b/robot-data/cache/contacts/groups/645541117.json index 5e76ec4..1ae7418 100644 --- a/robot-data/cache/contacts/groups/645541117.json +++ b/robot-data/cache/contacts/groups/645541117.json @@ -232,7 +232,7 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1634225807, - "lastSpeakTimestamp": 1718618906, + "lastSpeakTimestamp": 1719197143, "isOfficialBot": false, "rank": 1, "point": 0, diff --git a/robot-data/cache/contacts/groups/985835440.json b/robot-data/cache/contacts/groups/985835440.json index e3ff5c7..7e4ae8f 100644 --- a/robot-data/cache/contacts/groups/985835440.json +++ b/robot-data/cache/contacts/groups/985835440.json @@ -79,13 +79,11 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1575788884, - "lastSpeakTimestamp": 1718989430, + "lastSpeakTimestamp": 1719045217, "isOfficialBot": false, "rank": 2, "point": 862, - "honors": [ - 2 - ], + "honors": [], "temperature": 100 }, { @@ -166,12 +164,12 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1693914719, - "lastSpeakTimestamp": 1718965837, + "lastSpeakTimestamp": 1719205221, "isOfficialBot": false, "rank": 1, "point": 0, "honors": [], - "temperature": 92 + "temperature": 93 }, { "uin": 1669583939, @@ -183,7 +181,7 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1575788885, - "lastSpeakTimestamp": 1718945142, + "lastSpeakTimestamp": 1719190663, "isOfficialBot": false, "rank": 3, "point": 1419, @@ -217,7 +215,7 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1575788885, - "lastSpeakTimestamp": 1718990262, + "lastSpeakTimestamp": 1719204764, "isOfficialBot": false, "rank": 2, "point": 1275, @@ -236,7 +234,7 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1659707634, - "lastSpeakTimestamp": 1718977063, + "lastSpeakTimestamp": 1719152199, "isOfficialBot": false, "rank": 1, "point": 0, @@ -255,11 +253,13 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1654620022, - "lastSpeakTimestamp": 1718996694, + "lastSpeakTimestamp": 1719201158, "isOfficialBot": false, "rank": 1, "point": 0, - "honors": [], + "honors": [ + 1 + ], "temperature": 100 }, { @@ -272,7 +272,7 @@ "muteTimestamp": 0, "anonymousId": null, "joinTimestamp": 1705905892, - "lastSpeakTimestamp": 1718641084, + "lastSpeakTimestamp": 1719071506, "isOfficialBot": false, "rank": 1, "point": 0, diff --git a/robot-data/cache/servers.json b/robot-data/cache/servers.json index e92a3b5..0bb7eb3 100644 --- a/robot-data/cache/servers.json +++ b/robot-data/cache/servers.json @@ -1,42 +1,42 @@ [ { - "host": "157.148.54.249", + "host": "183.2.144.33", + "port": 8080 + }, + { + "host": "49.7.253.177", "port": 443 }, { - "host": "123.125.0.210", - "port": 80 + "host": "117.62.243.221", + "port": 8080 }, { - "host": "60.29.242.161", - "port": 80 - }, - { - "host": "182.50.15.44", + "host": "183.47.103.84", "port": 14000 }, { - "host": "182.50.8.188", + "host": "49.7.253.58", "port": 443 }, { - "host": "60.29.242.161", - "port": 14000 + "host": "180.109.192.57", + "port": 80 + }, + { + "host": "49.7.253.65", + "port": 80 + }, + { + "host": "42.81.193.250", + "port": 8080 }, { "host": "msfwifi.3g.qq.com", "port": 8080 }, { - "host": "112.86.230.139", - "port": 80 - }, - { - "host": "157.148.63.107", + "host": "121.229.94.168", "port": 8080 - }, - { - "host": "111.206.149.85", - "port": 80 } ] \ No newline at end of file diff --git a/robot-data/cache/session.bin b/robot-data/cache/session.bin index 9483223..30eec62 100644 Binary files a/robot-data/cache/session.bin and b/robot-data/cache/session.bin differ diff --git a/robot-data/cache/validator.bin b/robot-data/cache/validator.bin index 2bbbb0f..2b07980 100644 --- a/robot-data/cache/validator.bin +++ b/robot-data/cache/validator.bin @@ -1 +1,2 @@ -$ЂMJj@7fN \ No newline at end of file +G/=.M  + \ No newline at end of file diff --git a/robot-data/robot-device.json b/robot-data/robot-device.json index 8571557..867a059 100644 --- a/robot-data/robot-device.json +++ b/robot-data/robot-device.json @@ -1,16 +1,16 @@ { "deviceInfoVersion": 3, "data": { - "display": "MIRAI.918116.001", + "display": "MIRAI.876966.001", "product": "mirai", "device": "mirai", "board": "mirai", "brand": "mamoe", "model": "mirai", "bootloader": "unknown", - "fingerprint": "mamoe/mirai/mirai:10/MIRAI.200122.001/2326846:user/release-keys", - "bootId": "F8BDD101-0D96-69D3-A117-DB788D26CC62", - "procVersion": "Linux version 3.0.31-K6V6eb4d (android-build@xxx.xxx.xxx.xxx.com)", + "fingerprint": "mamoe/mirai/mirai:10/MIRAI.200122.001/3283546:user/release-keys", + "bootId": "95137BF8-ACF9-8C67-C3D5-8CC1AD7EA894", + "procVersion": "Linux version 3.0.31-c7lmK6ON (android-build@xxx.xxx.xxx.xxx.com)", "baseBand": "", "version": { "incremental": "5891938", @@ -22,9 +22,9 @@ "macAddress": "02:00:00:00:00:00", "wifiBSSID": "02:00:00:00:00:00", "wifiSSID": "", - "imsiMd5": "f44082a3afd35dd2ce6d7b261a387c3a", - "imei": "866377369265710", + "imsiMd5": "c82b7158108f1541c93f052a431c921f", + "imei": "863452599607560", "apn": "wifi", - "androidId": "e3d9f79d941f7a18" + "androidId": "c53a6e6fc1fcccdc" } } \ No newline at end of file diff --git a/src/main/java/com/mtz/qqbot/Listener/MessageendEvent.java b/src/main/java/com/mtz/qqbot/Listener/MessageendEvent.java new file mode 100644 index 0000000..b601e07 --- /dev/null +++ b/src/main/java/com/mtz/qqbot/Listener/MessageendEvent.java @@ -0,0 +1,43 @@ +package com.mtz.qqbot.Listener; + +import net.itbaima.robot.event.RobotListener; +import net.itbaima.robot.event.RobotListenerHandler; +import net.itbaima.robot.listener.MessageListener; +import net.mamoe.mirai.event.events.GroupMessageEvent; +import net.mamoe.mirai.event.events.GroupMessagePostSendEvent; +import net.mamoe.mirai.event.events.GroupMessagePreSendEvent; +import net.mamoe.mirai.event.events.MessagePreSendEvent; +import net.mamoe.mirai.message.data.At; +import net.mamoe.mirai.message.data.MessageChain; +import net.mamoe.mirai.message.data.MessageChainBuilder; +import net.mamoe.mirai.message.data.PlainText; + +import java.util.List; +import java.util.Scanner; + +@RobotListener +public class MessageendEvent extends MessageListener { + @RobotListenerHandler(contactId = 518909220) + + public static void test(GroupMessagePreSendEvent event){ + + + Scanner input = new Scanner(System.in); + if (input.hasNextLine()){ + String message = input.nextLine(); + MessageChain chain = new MessageChainBuilder()//此为固定写法 + .append(new PlainText( message)) + .build(); + System.out.println(chain); + + } + + } + public void test1(GroupMessagePostSendEvent event) { + + + + } + } + + diff --git a/src/main/java/com/mtz/qqbot/Listener/StartListener.java b/src/main/java/com/mtz/qqbot/Listener/StartListener.java deleted file mode 100644 index 0a59e5f..0000000 --- a/src/main/java/com/mtz/qqbot/Listener/StartListener.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.mtz.qqbot.Listener; - -import net.itbaima.robot.event.RobotListener; -import net.itbaima.robot.event.RobotListenerHandler; -import net.mamoe.mirai.Bot; -import net.mamoe.mirai.event.events.BotOnlineEvent; -import net.mamoe.mirai.message.data.MessageChain; -import net.mamoe.mirai.message.data.MessageChainBuilder; - -@RobotListener -public class StartListener { - @RobotListenerHandler() - public void isStart(BotOnlineEvent event) { - MessageChain chain = new MessageChainBuilder() - .append("你好,bot已上线!\n") - .append("输入“111”可以让bot理你一下\n") - .append("输入“钓鱼”来钓八条鱼中的其中一条\n") - .append("与bot进行私聊可以让管理员通过控制台回复你\n") - .append("在群聊中加上“呼叫管理”可以让管理员通过控制台在群聊中回复你\n") - .append("注意不要说不该说的词语,否则会被禁言并撤回") - .build(); - Bot.getInstance(1368740141).getGroup(518909220).sendMessage(chain); - System.out.println(chain); - } -} diff --git a/src/main/java/com/mtz/qqbot/Listener/test.java b/src/main/java/com/mtz/qqbot/Listener/test.java deleted file mode 100644 index 248769e..0000000 --- a/src/main/java/com/mtz/qqbot/Listener/test.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.mtz.qqbot.Listener; - - -import net.itbaima.robot.event.RobotListener; -import net.itbaima.robot.event.RobotListenerHandler; -import net.itbaima.robot.listener.MessageListener; -import net.mamoe.mirai.event.events.GroupMessageEvent; -import net.mamoe.mirai.message.data.MessageChain; -import net.mamoe.mirai.message.data.MessageChainBuilder; - -import java.util.List; - -@RobotListener -public class test extends MessageListener { - public test() { - super(List.of("@1368740141"), true); - } - - @RobotListenerHandler - public void test(GroupMessageEvent event){ - String message = event.getMessage().contentToString(); - if (invalidText(message)){ - MessageChain chain = new MessageChainBuilder().append("你好").build(); - event.getGroup().sendMessage(chain); - System.out.println("机器人被艾特"); - } - } -} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 46b8e79..4410466 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -14,4 +14,15 @@ itbaima: data: contact-cache: true work-dir: robot-data - cache-dir: cache \ No newline at end of file + cache-dir: cache +spring: + datasource: + driverClassName: com.mysql.jdbc.Driver + url: jdbc:mysql://localhost:3306/microservice + username: root + password: root +# thymeleaf: +# suffix: .html +# prefix: classpath:/templates/ +server: + port: 8080 \ No newline at end of file diff --git a/src/main/resources/static/image/临时会话1.png b/src/main/resources/static/image/临时会话1.png new file mode 100644 index 0000000..6a617c6 Binary files /dev/null and b/src/main/resources/static/image/临时会话1.png differ diff --git a/src/main/resources/static/image/临时会话2.png b/src/main/resources/static/image/临时会话2.png new file mode 100644 index 0000000..f58931d Binary files /dev/null and b/src/main/resources/static/image/临时会话2.png differ diff --git a/src/main/resources/static/image/原神1.png b/src/main/resources/static/image/原神1.png new file mode 100644 index 0000000..f51dbbd Binary files /dev/null and b/src/main/resources/static/image/原神1.png differ diff --git a/src/main/resources/static/image/原神2.png b/src/main/resources/static/image/原神2.png new file mode 100644 index 0000000..147ead7 Binary files /dev/null and b/src/main/resources/static/image/原神2.png differ diff --git a/src/main/resources/static/image/好友发送消息.jpg b/src/main/resources/static/image/好友发送消息.jpg new file mode 100644 index 0000000..3542d9a Binary files /dev/null and b/src/main/resources/static/image/好友发送消息.jpg differ diff --git a/src/main/resources/static/image/文字游戏.png b/src/main/resources/static/image/文字游戏.png new file mode 100644 index 0000000..a2483f8 Binary files /dev/null and b/src/main/resources/static/image/文字游戏.png differ diff --git a/src/main/resources/static/image/群聊回复1.png b/src/main/resources/static/image/群聊回复1.png new file mode 100644 index 0000000..21ea08f Binary files /dev/null and b/src/main/resources/static/image/群聊回复1.png differ diff --git a/src/main/resources/static/image/群聊回复2.png b/src/main/resources/static/image/群聊回复2.png new file mode 100644 index 0000000..6f2d307 Binary files /dev/null and b/src/main/resources/static/image/群聊回复2.png differ diff --git a/src/main/resources/static/image/钓鱼.png b/src/main/resources/static/image/钓鱼.png new file mode 100644 index 0000000..fa7f194 Binary files /dev/null and b/src/main/resources/static/image/钓鱼.png differ diff --git a/src/main/resources/static/image/骚扰机器人.png b/src/main/resources/static/image/骚扰机器人.png new file mode 100644 index 0000000..47f3fb6 Binary files /dev/null and b/src/main/resources/static/image/骚扰机器人.png differ diff --git a/src/main/resources/static/index.html b/src/main/resources/static/index.html index 89bb8ba..efd8a1f 100644 --- a/src/main/resources/static/index.html +++ b/src/main/resources/static/index.html @@ -1,6 +1,165 @@ - + + + + + + -

hello word!!!

-

this is a html page

+
#01
+
#02
+
#03
+
#04
+
#05
+
#06
+
#07
+
#08
+ +
+ #01 骚扰机器人 +
+ + + +

在群中发送“111”字样即可让robot“稍微的”理你一下

+
+
+
+ #02 群聊主动回复 +
+ + + + + +

在群聊中消息带上“呼叫管理”,管理员便可以在控制台进行回复

+
+
+
+ #03 临时会话回复 +
+ + + + +

在群聊中对bot进行临时会话,管理员便可在控制台进行回复

+
+
+
+ #04 好友消息回复 +
+ + +

bot的好友发起聊天后,管理员便可以在控制台进行回复

+ +
+
+
+ #05 接收消息 +
+ + + + +

在群聊中或者与机器人进行私聊,控制台便可以接收到信息

+
+
+
+ #06 钓鱼游戏 +
+ + +

在群聊中发送“钓鱼”字样,即可进行“有趣的”钓鱼游戏

+

“钓鱼虽好,可不要贪杆哦”

+
+
+
+ #07 禁言套餐 +
+ + +

在群中发送消息带有某个“**启动”“OP”等违禁词即可喜提“60S”禁言+撤回大礼包

‘ +

偷偷告送你,分开输入的话笨蛋robot是检测不出来的

+
+
+
+ #08 文字冒险(待实现) +
+ + +

在群聊中发送”txtgame“即可进行紧张刺激的文字冒险游戏

+

+
+
+ + + + + \ No newline at end of file