Skip to content

Commit

Permalink
Merge pull request #12 from MeetWq/refactor
Browse files Browse the repository at this point in the history
支持多适配器
  • Loading branch information
MeetWq committed Mar 6, 2024
2 parents 537522f + 77541e9 commit ea34ccd
Show file tree
Hide file tree
Showing 108 changed files with 3,736 additions and 7,698 deletions.
20 changes: 3 additions & 17 deletions .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,18 @@ SUPERUSERS=[] # 配置 NoneBot 超级用户
NICKNAME=[] # 配置机器人的昵称
COMMAND_START=["/", ""] # 配置命令起始字符
COMMAND_SEP=["."] # 配置命令分割字符

session_expire_timeout=30 # 会话超时时间(秒)
DRIVER=~fastapi+~httpx+~websockets

http_proxy= # 代理,如:http://127.0.0.1:1080
https_proxy=
socks_proxy=
no_proxy=127.0.0.1,localhost

apscheduler_autostart=true
apscheduler_log_level=30
apscheduler_config={ "apscheduler.timezone": "Asia/Shanghai" }

bilibili_dynamic_cron=["0", "*", "*", "*", "*", "*"] # [second, minute, hour, day, month, year]
blrec_address=your_address

bilibili_cookie= # B站用户cookie

rss_update_cron=["0", "*/5", "*", "*", "*", "*"] # RSS订阅间隔

dynmap_cron=["*/2", "*", "*", "*", "*", "*"] # MC dynmap更新间隔

fortune_style= # jrrp样式,目前有:summer, dragon_boat_festival, autumn, autumn_2022, mid_autumn, singleday, winter, winter_2022, light_snow, spring_festival_light, spring, spring_2023, zhongchun, qingming

tencent_secret_id= # 腾讯云相关配置
Expand All @@ -33,23 +24,18 @@ tts_project_id=
qcloud_region= # 对象存储所属地域
qcloud_bucket= # 对象存储存储桶名称

pixiv_token= # pixiv refresh_token

wolframalpha_appid= # WolframaAlpha api

baidu_unit_api_key= # 百度智能对话 UNIT 功能相关配置
baidu_unit_secret_key=
baidu_unit_bot_id=
chat_expire_time= # 闲聊会话过期时间(秒)

baidu_trans_appid= # 翻译相关api
baidu_trans_apikey=

caiyunai_apikey= # 彩云小梦 apikey

qweather_apikey= # 和风天气apikey
qweather_apitype= # 和风天气api类型

aidraw_api= # AI绘图api
sentry_dsn=
sentry_http_proxy=

chatgpt_session_token= # ChatGPT session_token
49 changes: 0 additions & 49 deletions bot.py

This file was deleted.

4,702 changes: 2,150 additions & 2,552 deletions poetry.lock

Large diffs are not rendered by default.

132 changes: 56 additions & 76 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,98 +7,78 @@ license = "MIT"

[tool.poetry.dependencies]
python = "^3.10"
baike = "^1.5.0"
bilireq = "^0.2.6"
bilireq = { version="^0.2.6", extras=["qrcode"] }
cachetools = "^5.0.0"
cn2an = "^0.5.0"
cos-python-sdk-v5 = "^1.9.0"
feedparser = "^6.0.0"
httpx = ">=0.19.0"
dateparser = "^1.1.8"
httpx = ">=0.20.0"
Jinja2 = "^3.0.0"
langid = "^1.1.0"
lxml = "^4.7.0"
mcstatus = "^6.5.0"
Pillow = "^9.0.0"
PixivPy-Async = "^1.2.0"
pydub = "^0.25.0"
python-Levenshtein-wheels = "^0.13.0"
tencentcloud-sdk-python = "^3.0.0"
thefuzz = "^0.19.0"
lxml = "^5.0.0"
mcstatus = "^11.0.0"
Pillow = "^10.0.0"
wolframalpha = "^5.0.0"
nonebot2 = "^2.0.0"
nonebot-adapter-onebot = "^2.2.3"
nonebot-plugin-apscheduler = "^0.3.0"
nonebot-plugin-htmlrender = "^0.2.0"
nonebot-plugin-chatrecorder = "^0.2.4"
nonebot-plugin-datastore = "^1.0.0"
nonebot-plugin-send-anything-anywhere = "^0.2.7"
nonebot-plugin-session = ">=0.0.5,<0.1.0"
nonebot-plugin-manager = "^0.5.16"
nonebot-plugin-withdraw = "^0.2.0"
nonebot-plugin-memes = "^0.4.7"
nonebot-plugin-shindan = "^0.4.0"
nonebot-plugin-remake = "^0.2.0"
# nonebot-plugin-caiyunai = "^0.2.0"
nonebot-plugin-emojimix = "^0.3.0"
nonebot-plugin-wordcloud = "^0.4.9"
nonebot-plugin-word-bank2 = "^0.1.8"
# nonebot-plugin-gamedraw = "^0.4.3"
nonebot-plugin-heweather = "^0.6.9"
nonebot-plugin-ddcheck = "^0.3.0"
nonebot-plugin-simplemusic = "^0.1.0"
nonebot-plugin-hikarisearch = "^0.1.0"
nonebot-plugin-wordle = "^0.3.1"
nonebot-plugin-handle = "^0.3.0"
nonebot-plugin-minesweeper = "^0.3.0"
nonebot-plugin-boardgame = "^0.3.0"
nonebot-plugin-chess = "^0.4.1"
nonebot-plugin-cchess = "^0.3.0"
nonebot-plugin-imagetools = "^0.2.0"
nonebot-plugin-oddtext = "^0.2.0"
nonebot-plugin-random = "^0.0.9"
# nonebot-bison = "^0.8.0"
nonebot-plugin-cocdicer = "^0.4.0"
nonebot2 = "^2.2.0"
nonebot-adapter-onebot = "^2.4.0"
# nonebot-adapter-red = "^0.9.0"
nonebot-plugin-apscheduler = "^0.4.0"
nonebot-plugin-boardgame = "^0.4.0"
nonebot-plugin-bracket = "^0.2.0"
nonebot-plugin-cchess = "^0.4.0"
nonebot-plugin-chatrecorder = "^0.6.0"
nonebot-plugin-chess = "^0.5.0"
nonebot-plugin-ddcheck = "^0.4.0"
nonebot-plugin-emojimix = "^0.4.0"
nonebot-plugin-handle = "^0.4.1"
nonebot-plugin-heweather = "^0.8.1"
nonebot-plugin-htmlrender = "^0.3.0"
nonebot-plugin-imagetools = "^0.4.0"
nonebot-plugin-memes = "^0.6.0"
nonebot-plugin-minesweeper = "^0.4.0"
nonebot-plugin-oddtext = "^0.2.0"
nonebot-plugin-orm = ">=0.7.0,<1.0.0"
nonebot-plugin-remake = "^0.4.0"
nonebot-plugin-send-anything-anywhere = "^0.6.0"
nonebot-plugin-session = "^0.3.0"
nonebot-plugin-sentry = "^1.1.0"
nonebot-plugin-shindan = "^0.6.0"
nonebot-plugin-userinfo = "^0.2.0"
nonebot-plugin-wordcloud = "^0.7.0"
nonebot-plugin-wordle = "^0.4.0"

[tool.poetry.group.dev.dependencies]
black = "^22.1.0"

[tool.nonebot]
plugins = [
"nonebot_plugin_apscheduler",
"nonebot_plugin_htmlrender",
"nonebot_plugin_boardgame",
"nonebot_plugin_bracket",
"nonebot_plugin_cchess",
"nonebot_plugin_chatrecorder",
"nonebot_plugin_datastore",
"nonebot_plugin_saa",
"nonebot_plugin_session",
"nonebot_plugin_manager",
"nonebot_plugin_withdraw",
"nonebot_plugin_memes",
"nonebot_plugin_shindan",
"nonebot_plugin_remake",
# "nonebot_plugin_caiyunai",
"nonebot_plugin_emojimix",
"nonebot_plugin_wordcloud",
"nonebot_plugin_word_bank2",
# "nonebot_plugin_gamedraw",
"nonebot_plugin_heweather",
"nonebot_plugin_chess",
"nonebot_plugin_ddcheck",
"nonebot_plugin_simplemusic",
"nonebot_plugin_hikarisearch",
"nonebot_plugin_wordle",
"nonebot_plugin_emojimix",
"nonebot_plugin_handle",
"nonebot_plugin_minesweeper",
"nonebot_plugin_boardgame",
"nonebot_plugin_chess",
"nonebot_plugin_cchess",
"nonebot_plugin_heweather",
"nonebot_plugin_imagetools",
"nonebot_plugin_memes",
"nonebot_plugin_minesweeper",
"nonebot_plugin_oddtext",
"nonebot-plugin-random",
# "nonebot_bison",
"nonebot_plugin_cocdicer",
"nonebot_plugin_bracket",
"nonebot_plugin_remake",
"nonebot_plugin_sentry",
"nonebot_plugin_shindan",
"nonebot_plugin_wordcloud",
"nonebot_plugin_wordle",
]
plugin_dirs = ["src/plugins"]
adapters = [
{ name = "OneBot V11", module_name = "nonebot.adapters.onebot.v11" },
# { name = "RedProtocol", module_name = "nonebot.adapters.red" },
]

[tool.ruff]
line-length = 88

[tool.ruff.lint]
select = ["E", "W", "F", "UP", "C", "T", "PYI", "PT", "Q"]
ignore = ["E402", "C901", "UP037"]

[build-system]
requires = ["poetry>=0.12"]
Expand Down
Loading

0 comments on commit ea34ccd

Please sign in to comment.