This repository has been archived by the owner on Oct 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
图片-妹子图.lua
86 lines (82 loc) · 2.91 KB
/
图片-妹子图.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
local log = require("log")
local Api = require("coreApi")
local json = require("json")
local http = require("http")
function ReceiveFriendMsg(CurrentQQ, data)
if data.MsgType ~= "TempSessionMsg" then
if string.find(data.Content, "妹子图") == 1 then
send_to_friend(CurrentQQ, data, "http://116.62.167.164:8080/mzt")
send_to_friend(CurrentQQ, data,
"https://api.169740.com/api/rand.img2?")
send_to_friend(CurrentQQ, data, "http://api.btstu.cn/sjbz/?lx=meizi")
send_to_friend(CurrentQQ, data, "https://api.lyh6.top/api.php")
send_to_friend(CurrentQQ, data, "https://api88.net/api/img/rand/")
end
end
if data.MsgType == "TempSessionMsg" and data.ToUin == tonumber(CurrentQQ) then
if string.find(data.Content, "妹子图") == 13 then
send_to_private(CurrentQQ, data, "http://116.62.167.164:8080/mzt")
send_to_private(CurrentQQ, data,
"https://api.169740.com/api/rand.img2?")
send_to_private(CurrentQQ, data,
"http://api.btstu.cn/sjbz/?lx=meizi")
send_to_private(CurrentQQ, data, "https://api.lyh6.top/api.php")
send_to_friend(CurrentQQ, data, "https://api88.net/api/img/rand/")
end
end
return 1
end
function ReceiveGroupMsg(CurrentQQ, data)
if string.find(data.Content, "妹子图") == 1 then
meizi_api_array = {
"http://116.62.167.164:8080/mzt",
"http://127.0.0.1:222/meizi/?type=purelady",
"http://api.btstu.cn/sjbz/?lx=meizi",
"https://apikey.net/?type=Mimg",
"https://api88.net/api/img/rand/",
"http://127.0.0.1:222/meizi/?type=purelady"
}
math.randomseed(os.time())
i = math.random(1, #meizi_api_array)
img_url = meizi_api_array[i]
log.notice("the img_url is %s", img_url)
send_to_group(CurrentQQ, data, img_url)
end
return 1
end
function ReceiveEvents(CurrentQQ, data, extData) return 1 end
function send_to_friend(CurrentQQ, data, img_url)
Api.Api_SendMsg(CurrentQQ, {
toUser = data.FromUin,
sendToType = 1,
sendMsgType = "PicMsg",
groupid = 0,
content = "",
picUrl = img_url,
picBase64Buf = "",
fileMd5 = "",
atUser = 0
})
end
function send_to_private(CurrentQQ, data, img_url)
Api.Api_SendMsg(CurrentQQ, {
toUser = data.FromUin,
sendToType = 3,
sendMsgType = "PicMsg",
groupid = data.TempUin,
content = "",
picUrl = img_url,
picBase64Buf = "",
fileMd5 = "",
atUser = 0
})
end
function send_to_group(CurrentQQ, data, img_url)
Api.Api_SendMsgV2(CurrentQQ, {
ToUserUid = data.FromGroupId,
SendToType = 2,
SendMsgType = "PicMsg",
Content = "",
PicUrl = img_url
})
end