-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
37 lines (35 loc) · 1.2 KB
/
main.py
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
from modules.receive import rev_msg
from modules.handle_message import private_handle
from modules.handle_message import group_handle
print('监听服务器已开启....')
while True:
try:
rev = rev_msg()
if rev == None:
continue
except:
continue
if rev["post_type"] == "message":
print(rev) # 需要功能自己DIY
if rev["message_type"] == "private": # 私聊
private_handle(rev)
elif rev["message_type"] == "group": # 群聊
group_handle(rev)
else:
continue
elif rev["post_type"] == "notice":
if rev["notice_type"] == "group_upload": # 有人上传群文件
continue
elif rev["notice_type"] == "group_decrease": # 群成员减少
continue
elif rev["notice_type"] == "group_increase": # 群成员增加
continue
else:
continue
elif rev["post_type"] == "request":
if rev["request_type"] == "friend": # 添加好友请求
pass
if rev["request_type"] == "group": # 加群请求
pass
else: # rev["post_type"]=="meta_event":
continue