-
Notifications
You must be signed in to change notification settings - Fork 4
/
revoke.lua
33 lines (30 loc) · 946 Bytes
/
revoke.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
local Api = require('coreApi')
function ReceiveGroupMsg(CurrentQQ, data)
if data.FromUserId == tonumber(CurrentQQ) then
if data.Content:find('revoke') then
local delay = 10 --默认10s后撤回
local num = data.Content:match('revoke%[(%d+)%]') --revoke[20] 20s后撤回
if tonumber(num) then
delay = tonumber(num)
end
os.execute('sleep ' .. delay)
Api.Api_CallFunc(
CurrentQQ,
'PbMessageSvc.PbMsgWithDraw',
{
GroupID = data.FromGroupId,
MsgSeq = data.MsgSeq,
MsgRandom = data.MsgRandom
}
)
return 2
end
end
return 1
end
function ReceiveFriendMsg(CurrentQQ, data)
return 1
end
function ReceiveEvents(CurrentQQ, data, extData)
return 1
end