Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛修复词库问答查看全局词条问题+代码优化 #1579

Closed
wants to merge 47 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
1c58a8f
✨ 自动更新
HibiKier Aug 19, 2024
0fbe7be
🐛 修改自动更新
HibiKier Aug 19, 2024
1f90490
🐛 自动更新
HibiKier Aug 19, 2024
99774ad
✨ 插件商店
HibiKier Aug 20, 2024
16e43de
更新 config.py
Copaan Aug 21, 2024
4ed5cca
Merge pull request #1564 from Copaan/dev
HibiKier Aug 21, 2024
fead5a8
更新 data_source.py
Copaan Aug 21, 2024
96ca33f
Merge pull request #1565 from Copaan/dev
HibiKier Aug 21, 2024
6d58f6a
🐛 修改bug
HibiKier Aug 21, 2024
ef662a1
🎨
HibiKier Aug 21, 2024
2fe825f
✨ 新群被动添加时所有群默认状态
HibiKier Aug 21, 2024
f578123
:bug: 为 'get_browser()' 添加缺少的 'await' 关键字以确保正确等待异步函数执行
BalconyJH Aug 22, 2024
7c16314
代码优化
Copaan Aug 22, 2024
6679744
Merge pull request #1566 from BalconyJH/dev
HibiKier Aug 22, 2024
7e7e885
Merge pull request #1567 from Copaan/dev
HibiKier Aug 22, 2024
06b1af4
🎨
HibiKier Aug 22, 2024
ebecffe
🐛WebUI密钥修改为随机密钥
AkashiCoin Aug 23, 2024
1401b31
Merge pull request #1568 from AkashiCoin/webui-patch
HibiKier Aug 23, 2024
1787123
✨集成webui资源,可直接访问
AkashiCoin Aug 23, 2024
7519bad
Merge pull request #1569 from AkashiCoin/webui-patch
HibiKier Aug 23, 2024
4a9a856
✨ 签到ui改版
HibiKier Aug 24, 2024
a9ed5d1
Merge branch 'dev' of https://github.com/HibiKier/zhenxun_bot into dev
HibiKier Aug 24, 2024
28b7415
🐛 修复bug
HibiKier Aug 24, 2024
e0f323f
feat(plugin_store): 添加搜索插件功能及更新配置URL
molanp Aug 24, 2024
f692536
🎨 签到优化与配置修改
HibiKier Aug 24, 2024
638efd9
feat(plugin_store): 添加更新插件功能
molanp Aug 24, 2024
447c558
fix(__init__.py): 移除不必要的 `type: ignore` 注释
molanp Aug 24, 2024
45c6dbd
🎨 代码优化
HibiKier Aug 24, 2024
0822512
解决冲突
molanp Aug 24, 2024
68a71c5
解决冲突
molanp Aug 24, 2024
a2c3f11
解决冲突3
molanp Aug 24, 2024
4138083
Update __init__.py
HibiKier Aug 24, 2024
b10b806
Update data_source.py
HibiKier Aug 24, 2024
c089395
Update config.py
HibiKier Aug 24, 2024
77673f6
Merge branch 'dev' into dev
HibiKier Aug 24, 2024
7390799
Merge pull request #1572 from molanp/dev
HibiKier Aug 24, 2024
ceb8f66
🎨 插件商店代码优化
HibiKier Aug 24, 2024
1236a93
🎨 代码优化
HibiKier Aug 24, 2024
910542f
✨ 功能调用统计使用html截图
HibiKier Aug 24, 2024
35699f8
🐛 修复群白名单和认证无法删除
HibiKier Aug 25, 2024
8d6417b
🎨 添加阴影
HibiKier Aug 25, 2024
69f09b9
✨ 更新群组信息
HibiKier Aug 25, 2024
65a6f60
🐛 WebUI初始化逻辑修改 (#1574)
AkashiCoin Aug 26, 2024
66e6f44
✨ 更新插件商店 (#1573)
xuanerwa Aug 26, 2024
b443321
✨ 支持bot运行检查 (#1576)
AkashiCoin Aug 26, 2024
073cab5
Revert "🐛 WebUI初始化逻辑修改 (#1574)" (#1577)
AkashiCoin Aug 26, 2024
b48ec39
🐛修复词库问答查看全局词条问题+代码优化
AkashiCoin Aug 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions .env.dev
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


SUPERUSERS=[""]

COMMAND_START=[""]
Expand All @@ -13,6 +11,16 @@ SESSION_EXPIRE_TIMEOUT=30
# 全局图片统一使用bytes发送,当真寻与协议端不在同一服务器上时为True
IMAGE_TO_BYTES = False

# 回复消息时自称
SELF_NICKNAME="小真寻"

# 数据库配置
# 示例: "postgres://user:[email protected]:5432/database"
DB_URL = ""

# 系统代理
# SYSTEM_PROXY = "http://127.0.0.1:7890"

PLATFORM_SUPERUSERS = '
{
"qq": [""],
Expand All @@ -22,6 +30,12 @@ PLATFORM_SUPERUSERS = '

DRIVER=~fastapi+~httpx+~websockets


# LOG_LEVEL=DEBUG
# 服务器和端口
HOST = 127.0.0.1
PORT = 8080

# kook adapter toekn
# kaiheila_bots =[{"token": ""}]

Expand Down Expand Up @@ -51,11 +65,4 @@ DRIVER=~fastapi+~httpx+~websockets
# '

# application_commands的{"*": ["*"]}代表将全部应用命令注册为全局应用命令
# {"admin": ["123", "456"]}则代表将admin命令注册为id是123、456服务器的局部命令,其余命令不注册

# LOG_LEVEL=DEBUG
# 服务器和端口
HOST = 127.0.0.1
PORT = 8080


# {"admin": ["123", "456"]}则代表将admin命令注册为id是123、456服务器的局部命令,其余命令不注册
43 changes: 43 additions & 0 deletions .github/workflows/bot_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: 检查bot是否运行正常

on:
push:
branches: [ "dev", "main"]
pull_request:
branches: [ "dev", "main"]

jobs:
bot-check:
runs-on: ubuntu-latest
name: bot check
steps:
- uses: actions/checkout@v4

- name: Setup Python
id: setup_python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install Poetry
run: pip install poetry

# Poetry cache depends on OS, Python version and Poetry version.
- name: Cache Poetry cache
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry
key: poetry-cache-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}

- name: Install dependencies
run: |
mv scripts/bot_check.py bot_check.py
rm -rf poetry.lock
poetry source remove ali
poetry install --no-root
poetry run pip install pydantic==1.10

- name: Check bot run
id: bot_check_run
run: |
poetry run python3 bot_check.py
5 changes: 3 additions & 2 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
from nonebot.adapters.kaiheila import Adapter as KaiheilaAdapter
from nonebot.adapters.onebot.v11 import Adapter as OneBotV11Adapter

nonebot.init()

from zhenxun.services.db_context import disconnect, init

nonebot.init()
driver = nonebot.get_driver()
driver.register_adapter(OneBotV11Adapter)
driver.register_adapter(KaiheilaAdapter)
Expand All @@ -18,7 +19,7 @@
driver.on_startup(init)
driver.on_shutdown(disconnect)

nonebot.load_builtin_plugins("echo") # 内置插件
# nonebot.load_builtin_plugins("echo")
nonebot.load_plugins("zhenxun/builtin_plugins")
nonebot.load_plugins("zhenxun/plugins")

Expand Down
Binary file added requirements.txt
Binary file not shown.
Binary file removed resources/font/HWXingKai.ttf
Binary file not shown.
Binary file removed resources/font/HWZhongSong.ttf
Binary file not shown.
Binary file removed resources/font/sarasa-mono-sc-nerd-regular.ttf
Binary file not shown.
Binary file removed resources/font/wq.ttf
Binary file not shown.
Binary file removed resources/font/yz.ttf
Binary file not shown.
Binary file removed resources/font/yzz.ttc
Binary file not shown.
Binary file modified resources/image/wordcloud/default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions resources/template/bar_chart/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

body {
position: absolute;
left: -8px;
top: -8px;
}

50 changes: 50 additions & 0 deletions resources/template/bar_chart/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ECharts Example</title>
<!-- 引入ECharts -->
<script src="https://cdn.bootcss.com/echarts/4.2.1/echarts.min.js"></script>
<link rel="stylesheet" href="main.css">
</head>
<body>
<!-- 图表容器 -->
<div id="main" style="width: 1000px;height:500px;"></div>

<script type="text/javascript">
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(document.getElementById('main'));

// 指定图表的配置项和数据
var option = {
xAxis: {
type: 'value',
boundaryGap: [0, 0.01]
},
yAxis: {
type: 'category',
data: {{data.category_data|tojson}}
},
series: [
{
data: {{data.data|tojson}},
type: 'bar',
itemStyle: {
// 为每个柱子设置随机颜色
color: function () {
// 生成一个随机颜色
return 'rgb(' +
Math.round(Math.random() * 255) + ',' +
Math.round(Math.random() * 255) + ',' +
Math.round(Math.random() * 255) + ')';
}
}
}
]
};

// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
</script>
</body>
</html>
Loading
Loading