Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
SAGIRI-kawaii committed Apr 12, 2021
1 parent 43e2849 commit cc64976
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions SAGIRIBOT/Handler/Handlers/PDFSearchHandler.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import re
import aiohttp
from bs4 import BeautifulSoup

Expand Down
2 changes: 1 addition & 1 deletion SAGIRIBOT/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def get_config(config: str):
dbPass: str
setuPath: str
"""
with open('config.yaml', 'r', encoding='utf-8') as f: # 从json读配置
with open('config.yaml', 'r', encoding='utf-8') as f:
configs = yaml.load(f.read())
if config in configs.keys():
return configs[config]
Expand Down
7 changes: 4 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
import json
import yaml
from loguru import logger

from graia.application.event.messages import Group, Member
Expand All @@ -13,9 +14,8 @@
from SAGIRIBOT.Handler.Handlers import *
from SAGIRIBOT.Core.AppCore import AppCore


with open('config.json', 'r', encoding='utf-8') as f: # 从json读配置
configs = json.loads(f.read())
with open('config.yaml', 'r', encoding='utf-8') as f:
configs = yaml.load(f.read())

core = AppCore(configs)

Expand All @@ -38,6 +38,7 @@
StylePictureGeneraterHandler(),
AvatarFunPicHandler(),
AbbreviatedPredictionHandler(),
PDFSearchHandler(),
LeetcodeInfoHanlder(),
QrCodeGeneratorHandler(),
ImageSearchHandler(),
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ python_dateutil==2.8.1
PyYAML==5.4.1
graia-application-mirai==0.18.4
graia-broadcast==0.8.10
wordcloud==1.8.1
Binary file removed statics/._.DS_Store
Binary file not shown.

0 comments on commit cc64976

Please sign in to comment.