未验证 提交 1254316a 编辑于 作者: yuudi's avatar yuudi 提交者: GitHub
浏览文件

Merge pull request #138 from linepro6/develop

...@@ -69,7 +69,8 @@ server { ...@@ -69,7 +69,8 @@ server {
## 输出文件直接访问(可选,性能) ## 输出文件直接访问(可选,性能)
#location /yobot/output/ { #location /yobot/output/ {
# alias /home/yobot/src/client/output/; # 你的输出文件目录,如果你修改了`public_basepath`,请同时修改这里的`location` # alias /home/yobot/src/client/yobot_data/output/; # 你的输出文件目录,如果你修改了`public_basepath`,请同时修改这里的`location`
# charset utf-8; # 设置 HTTP 响应的字符集避免页面出现乱码
# expires 30d; # expires 30d;
#} #}
......
...@@ -221,8 +221,8 @@ class Gacha: ...@@ -221,8 +221,8 @@ class Gacha:
db = db_conn.cursor() db = db_conn.cursor()
sql_info = list(db.execute( sql_info = list(db.execute(
"SELECT colle FROM Colle WHERE qqid=?", (qqid,))) "SELECT colle FROM Colle WHERE qqid=?", (qqid,)))
db_conn.close()
if len(sql_info) != 1: if len(sql_info) != 1:
db_conn.close()
return nickname + "的仓库为空" return nickname + "的仓库为空"
colle = pickle.loads(sql_info[0][0]) colle = pickle.loads(sql_info[0][0])
more_colle = [] more_colle = []
...@@ -230,8 +230,10 @@ class Gacha: ...@@ -230,8 +230,10 @@ class Gacha:
sql_info = list(db.execute( sql_info = list(db.execute(
"SELECT colle FROM Colle WHERE qqid=?", (other_qq,))) "SELECT colle FROM Colle WHERE qqid=?", (other_qq,)))
if len(sql_info) != 1: if len(sql_info) != 1:
return "[CQ:at,qq={}]的仓库为空".format(other_qq) db_conn.close()
return "[CQ:at,qq={}] 的仓库为空".format(other_qq)
more_colle.append(pickle.loads(sql_info[0][0])) more_colle.append(pickle.loads(sql_info[0][0]))
db_conn.close()
if not os.path.exists(os.path.join(self.setting["dirname"], "temp")): if not os.path.exists(os.path.join(self.setting["dirname"], "temp")):
os.mkdir(os.path.join(self.setting["dirname"], "temp")) os.mkdir(os.path.join(self.setting["dirname"], "temp"))
showed_colle = set(colle) showed_colle = set(colle)
...@@ -241,7 +243,7 @@ class Gacha: ...@@ -241,7 +243,7 @@ class Gacha:
showdata["header"] = ["角色", nickname] showdata["header"] = ["角色", nickname]
for memb in moreqq_list: for memb in moreqq_list:
try: try:
membinfo = await self.bot_api.get_stranger_info(memb) membinfo = await self.bot_api.get_stranger_info(user_id=memb)
showdata["header"].append(membinfo["nickname"]) showdata["header"].append(membinfo["nickname"])
except: except:
showdata["header"].append(str(memb)) showdata["header"].append(str(memb))
......
支持 Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册