blob: d525371e70e7705e3bed9a2cfb02b98ced16e718 (
plain)
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
import os
import json
import time
from nonebot.default_config import *
print("正在导入记忆模块ing...")
with open('config.json', 'r', encoding='UTF-8') as f:
data = json.load(f)
# 加载监听的 IP 和 端口
HOST = data["HOST"]
PORT = data["PORT"]
# 机器人在繁忙之时的回复
SESSION_RUNNING_EXPRESSION = data["SESSION_RUNNING_EXPRESSION"]
# 机器人在用户取消操作时的回复
SESSION_CANCEL_EXPRESSION = data["SESSION_CANCEL_EXPRESSION"]
# 机器人的主人(QQ号)即 超级用户
try:
SUPERUSERS = data["SUPERUSERS"]
print("主人已识别!")
except:
print("ATRI无法从记忆储蓄模块找到主人...如需帮助,请查看安装手册")
time.sleep(1)
print("仿生人没有主人是无法继续存在的!将于三秒后执行休眠...")
time.sleep(3)
os._exit(0)
# 机器人名称,替代 @ 和 命令开头
try:
NICKNAME = data["NICKNAME"]
print("对ATRI的特别称呼已加载!")
except:
print("ATRI没特别的小昵称嘛...彳亍8")
time.sleep(1)
print("既然这样那叫我ATRI就好力!")
NICKNAME = {'ATRI', 'アトリ'}
time.sleep(1)
wait = input("是否继续: Y/N\n")
if wait == "Y" or wait == 'y':
pass
else:
os._exit(0)
# 自定义命令开头
try:
COMMAND_START = data["COMMAND_START"]
print("呼叫指令已加载!")
except:
print("如果没指定特别呼叫ATRI的手势的话,直接称呼我名称吧!")
COMMAND_START = {'ATRI', ''}
time.sleep(1)
wait = input("是否继续: Y/N\n")
if wait == "Y" or wait == 'y':
pass
else:
os._exit(0)
# API url:https://api.lolicon.app/#/setu
try:
LoliconAPI = data["API"]["LoliconAPI"]
print("涩图大门的钥匙已到手!")
except:
print("似乎没拿到大门的钥匙呢...如需帮助,请查看安装手册")
print("...跳过!")
time.sleep(1)
wait = input("是否继续: Y/N\n")
if wait == "Y" or wait == 'y':
pass
else:
os._exit(0)
# API url:https://www.faceplusplus.com.cn/
try:
FaceplusAPI = data["API"]["FaceplusAPI"]
print("用于人脸识别的钥匙已到手!")
except:
print("貌似没拿到人脸识别的钥匙呢...如需帮助,请查看安装手册")
print("...跳过!")
time.sleep(1)
wait = input("是否继续: Y/N\n")
if wait == "Y" or wait == 'y':
pass
else:
os._exit(0)
try:
FaceplusSECRET = data["API"]["FaceplusSECRET"]
print("用于人脸识别的验证码已到手!")
except:
print("貌似没拿到人脸识别的验证码呢...如需帮助,请查看安装手册")
print("...跳过!")
time.sleep(1)
wait = input("是否继续: Y/N\n")
if wait == "Y" or wait == 'y':
pass
else:
os._exit(0)
# API url:https://cloud.baidu.com/
try:
BaiduApiID = data["API"]["BaiduApiID"]
print("用于图片识别的ID已到手!")
except:
print("貌似没拿到图片识别的ID呢...如需帮助,请查看安装手册")
print("...跳过!")
time.sleep(1)
wait = input("是否继续: Y/N\n")
if wait == "Y" or wait == 'y':
pass
else:
os._exit(0)
try:
BaiduApiKEY = data["API"]["BaiduApiKEY"]
print("用于图片识别的KEY已到手!")
except:
print("貌似没拿到图片识别的KEY呢...如需帮助,请查看安装手册")
print("...跳过!")
time.sleep(1)
wait = input("是否继续: Y/N\n")
if wait == "Y" or wait == 'y':
pass
else:
os._exit(0)
try:
BaiduApiSECRET = data["API"]["BaiduApiSECRET"]
print("用于图片识别的SECRET已到手!")
except:
print("貌似没拿到图片识别的SECRET呢...如需帮助,请查看安装手册")
print("...跳过!")
time.sleep(1)
wait = input("是否继续: Y/N\n")
if wait == "Y" or wait == 'y':
pass
else:
os._exit(0)
# API url:https://saucenao.com/search.php
try:
SauceNaoKEY = data["API"]["SauceNaoKEY"]
print("用于SAUCENAO的钥匙已到手!")
except:
print("貌似没拿到SAUCENAO的钥匙呢...如需帮助,请查看安装手册")
print("...跳过!")
time.sleep(1)
wait = input("是否继续: Y/N\n")
if wait == "Y" or wait == 'y':
pass
else:
os._exit(0)
|