Skip to content

Commit 209c871

Browse files
committed
idk
1 parent 1cee970 commit 209c871

File tree

91 files changed

+1330
-507
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+1330
-507
lines changed

.github/workflows/webui-build.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: "WebUI Build and Sync (Weekly, UTC)"
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 0'
6+
workflow_dispatch:
7+
8+
jobs:
9+
sync-webui:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout WebUI repo
14+
uses: actions/checkout@v2
15+
with:
16+
ref: beta
17+
repository: DoroWolf/akari-bot-webui
18+
token: ${{ secrets.GITHUB_TOKEN }}
19+
20+
- name: Set up Node.js and install dependencies
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: '16'
24+
- run: |
25+
npm install
26+
npm run build
27+
28+
- name: Move dist to webui
29+
run: |
30+
mv dist webui
31+
32+
- name: Checkout Repo
33+
uses: actions/checkout@v2
34+
with:
35+
repository: Teahouse-Studios/akari-bot
36+
token: ${{ secrets.GITHUB_TOKEN }}
37+
path: akari-bot
38+
39+
# 第五步:复制webui到仓库B的根目录
40+
- name: Copy webui to akari-bot
41+
run: |
42+
cp -r webui akari-bot/
43+
44+
# 第六步:检查是否有变化
45+
- name: Check for changes
46+
run: |
47+
cd akari-bot
48+
git diff --exit-code || echo "Changes detected"
49+
50+
# 第七步:如果有变化,提交并推送
51+
- name: Commit and push changes
52+
run: |
53+
cd akari-bot
54+
git config --global user.name "GitHub Actions"
55+
git config --global user.email "actions@github.com"
56+
git add .
57+
git diff --quiet || (git commit -m "Sync WebUI [skip ci]" && git push)

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ assets/modules/maimai*
1919
assets/modules/phigros*
2020
assets/private*
2121
bots/**/assets
22+
webui/config.json
2223
version*
2324
!version.py
2425
.pid_last

assets/config_store/en_us/bot_qqbot.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# The basic config section of the platform. The value ​​filled in here can be displayed in the message. Please do not fill in sensitive information in this section.
77
qq_bot_appid = "<Replace me with (int, str) value>" # The QQ official robot AppID.
88
enable = false # Whether to enable this platform.
9-
qq_private_bot = false # Whether it is a private robot when using the QQ official robot.
9+
qq_private_bot = false # Whether it is a private robot when using the QQ official bot.
1010
qq_bot_enable_send_url = false # Whether to enable sending URLs when using QQ official robot.
1111
qq_typing_emoji = 181 # When using QQ related protocol terminals, the response emoji ID attached to the message when processing the message. It needs to be supported by the protocol terminal. For details of emoji ID, see: https://bot.q.qq.com/wiki/develop/api/openapi/emoji/model.html#Emoji
1212

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
# NOTE: TOML is not like Python. Do not use Python syntax here.
33
# EXAMPLE: Boolean values in TOML must be lowercase.
44

5-
[bot_api_secret]
5+
[bot_web_secret]
66
# The secret config section of the platform. The bot will try to intercept if the value here accidentally appears in the message sent, but be careful to prevent leakage.
7-
jwt_secret = "<Replace me with str value>" # The authentication key for the built-in API, it can be filled in at will.
7+
api_allow_origins = ["*"] # The API service allows CORS sources list.
8+
jwt_secret = "<Replace me with str value>" # The authentication key for the built-in API, for signing and verifying validity.
89

9-
[bot_api]
10+
[bot_web]
1011
# The basic config section of the platform. The value ​​filled in here can be displayed in the message. Please do not fill in sensitive information in this section.
1112
enable = true # Whether to enable this platform.
1213
api_port = 5000 # The port number of the API service.
14+
webui_port = 8081 # The port number of the WebUI service.

assets/config_store/en_us/config.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ dice_output_len = 200 # The maximum length output of dice module.
5757
dice_roll_limit = 10 # The maximum number of dice rolled per command of dice module.
5858
dice_detail_count = 5 # The total number of dice rolled n times of dice module, it will no longer show details when this value is exceeded.
5959
dice_count_limit = 10 # The maximum number of items in dice expressions of dice module.
60-
ncmusic_enable_card = false # Whether enables card messages of ncmusic module. (Only valid on QQ platform)
60+
ncmusic_enable_card = false # Whether enables card messages of ncmusic module. (Only valid on QQ client)
6161
wiki_whitelist_url = "<Replace me with str value>" # Wiki whitelist application URL.
6262
wordle_disable_image = false # Whether to disable images of wordle module.
6363
slower_schedule = false # Whether to enable a slower scheduled task scheduler. (To reduce request pressure)
@@ -77,4 +77,4 @@ wolfram_alpha_appid = "<Replace me with str value>" # WolframAlpha AppID. (For w
7777
diving_fish_developer_token = "<Replace me with str value>" # Developer token for Diving Fish prober. (For maimai module)
7878
curseforge_api_key = "<Replace me with str value>" # CurseForge API key. (For mod_dl module)
7979
ncmusic_api = "<Replace me with str value>" # API address of NetEase Cloud Music API. (For ncmusic module)
80-
osu_api_key = "<Replace me with str value>" # osu! API Key (for osu module)
80+
osu_api_key = "<Replace me with str value>" # Osu! API Key (for osu module)
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
# 注意:TOML 不是 Python。请不要在此处使用 Python 语法。
33
# 例如:TOML 中的布尔值必须是小写。
44

5-
[bot_api_secret]
5+
[bot_web_secret]
66
# 平台端的密钥配置部分,此处的值若意外出现在发送的消息中,机器人会尝试拦截。但请务必提防泄露。
7-
jwt_secret = "<Replace me with str value>" # 内置 API 的认证密钥,随意填写即可。
7+
api_allow_origins = ["*"] # API 服务允许 CORS 的源列表。
8+
jwt_secret = "<Replace me with str value>" # 内置 API 的身份认证密钥,用于签名和验证有效性。
89

9-
[bot_api]
10+
[bot_web]
1011
# 平台端的配置部分,此处填写的值可在消息中以明文形式展示。请不要在此部分填写敏感信息。
1112
enable = true # 是否启用此平台。
1213
api_port = 5000 # API 服务的端口号。
14+
webui_port = 8081 # WebUI 服务的端口号。

assets/config_store/zh_cn/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ dice_output_len = 200 # dice 模块输出最大长度。
5757
dice_roll_limit = 10 # dice 模块一次命令投掷次数上限。
5858
dice_detail_count = 5 # dice 模块 n 次投掷的骰子的总量超过该值时将不再显示详细信息。
5959
dice_count_limit = 10 # dice 模块骰子表达式项数上限。
60-
ncmusic_enable_card = false # ncmusic 模块是否启用卡片消息。(仅在 QQ 平台有效
60+
ncmusic_enable_card = false # ncmusic 模块是否启用卡片消息。(仅在 QQ 客户端有效
6161
wiki_whitelist_url = "<Replace me with str value>" # Wiki 白名单申请网址。
6262
wordle_disable_image = false # wordle 模块是否禁用图片。
6363
slower_schedule = false # 是否启用更慢的计划任务调度器。(减少请求压力用)
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
# 注意:TOML 不是 Python。請不要在此處使用 Python 語法。
33
# 例如:TOML 中的布林值必須是小寫。
44

5-
[bot_api_secret]
5+
[bot_web_secret]
66
# 平台端的金鑰設定部分,此處的值若意外出現在傳送的訊息中,機器人會嘗試攔截。但請務必提防洩漏。
7-
jwt_secret = "<Replace me with str value>" # 內建 API 的認證金鑰,隨意填寫即可。
7+
api_allow_origins = ["*"] # API 服務允许 CORS 的來源列表。
8+
jwt_secret = "<Replace me with str value>" # 內建 API 的身份認證金鑰,用於簽署和驗證有效性。
89

9-
[bot_api]
10+
[bot_web]
1011
# 平台端的設定部分,此處填寫的值可在訊息中以明文顯示。請不要在此部分填寫敏感資訊。
1112
enable = true # 是否啟用此平台。
1213
api_port = 5000 # API 服務的連接埠號。
14+
webui_port = 8081 # WebUI 服務的連接埠號。

assets/config_store/zh_tw/config.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ enable_get_petal = false # 是否允許取得花瓣。
3535
gained_petal_limit = 0 # 單日取得花瓣上限。
3636
lost_petal_limit = 0 # 單日失去花瓣上限。
3737
use_secrets_random = false # 是否使用基於 secrets 庫的隨機數產生器。
38-
web_render_local = "<Replace me with str value>" # 本地 WebRender 位址
38+
web_render_local = "<Replace me with str value>" # 本地 WebRender 服務位址
3939
enable_langsmith = "<Replace me>"
4040
langsmith_endpoint = "<Replace me>"
4141
langsmith_project = "<Replace me>"
@@ -57,7 +57,7 @@ dice_output_len = 200 # dice 模組輸出最大長度。
5757
dice_roll_limit = 10 # dice 模組一次指令投擲次數上限。
5858
dice_detail_count = 5 # dice 模組 n 次投擲的骰子的總量超過該值時將不再顯示詳細資訊。
5959
dice_count_limit = 10 # dice 模組骰子表示式項數上限。
60-
ncmusic_enable_card = false # ncmusic 模組是否啟用卡片訊息。(僅在 QQ 平台有效
60+
ncmusic_enable_card = false # ncmusic 模組是否啟用卡片訊息。(僅在 QQ 用戶端有效
6161
wiki_whitelist_url = "<Replace me with str value>" # Wiki 白名單申請網址。
6262
wordle_disable_image = false # wordle 模組是否停用圖片。
6363
slower_schedule = false # 是否啟用更慢的排程任務調度器。(減少請求壓力用)
133 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)