2025-03-02 10:12:40 +08:00
2025-03-02 11:04:55 +08:00
2025-02-23 20:30:26 +08:00
2025-02-23 20:30:26 +08:00
2025-03-02 10:32:36 +08:00
2025-02-23 20:30:26 +08:00
2025-03-03 22:08:04 +08:00
2025-02-23 20:30:26 +08:00

SaltBot

A QQbot Based on Nonebot.

  • 增加上传成绩功能
  • 增加发送收藏品功能
  • 优化整体数据大小

How to Use

Caution

This guide assumes you have basic programming & networking knowledge. This bot will need change some code to run correctly.

  1. Install Python3.12
  2. Install Nonebot
  3. Download this repo.
  4. Download the resource file for maicard and put it into Step8's resource path. *The resource file and script code are from Error063
  5. Create a nonebot project at another place and copy .venv/pyvenv.cfg to the bot folder.
  6. Change the configuration on .env.prod.
  7. Change the script(generate_img.py) and picture path(Step 8 generate path) on /.venv/Lib/site-packages/nonebot_plugin_maimai_helper/__init__.py, line 197, 200, and line 201. (Please ignore my sh!t code, thanks:()
  8. Also, the script need change resouse path, too. The defult res path is F:/res/ ; generate path is F:/img/
  9. Change the picture cache path on /nonebot_plugin_maimai_helper/__init__.py, line 83 and 89. Just same as Step 8's generate path.
  10. Run nb run in the SaltBot folder.

Note

This bot will use MySQL to storge your & others Userid & Token. Make sure your have a MySQL database on your device. You can change IP(/nonebot_plugin_maimai_helper/util/utils.py) if your database isn't on your local device.


如何使用SaltBot

Caution

这篇指南默认你拥有基础计算机知识。 此 Bot 将需要更改一些代码以正确运行。

  1. 安装 Python3.12
  2. 安装 Nonebot
  3. 下载此仓库到你的本地设备。
  4. 下载用于生成maicard的资源文件并将此文件目录填入至第8步的资源路径。*资源文件及脚本代码来源Error063
  5. 在别的地方创建一个新的nonebot项目并将 .venv/pyvenv.cfg 复制到你的Bot目录下并覆盖。
  6. 按照.env.prod中的提示更改配置。
  7. 更改在/.venv/Lib/site-packages/nonebot_plugin_maimai_helper/__init__.py下的第 197, 200, 201行的脚本(generated_img.py)和图片路径(第8步的生成路径)。(不要在意我的狗史代码谢谢你¯_(ツ)_/¯)
  8. 你还需要更改脚本generate_img.py的资源路径,默认资源路径为 F:/res/ 生成路径为 F:/img/
  9. 更改/nonebot_plugin_maimai_helper/__init__.py下的第83和89行的图片缓存路径与第八步相同即可。
  10. 在Bot运行目录下运行 nb run 指令以启动。

Note

此Bot依赖于MySQL数据库以存储你和别人的useridtoken。 请确保你在本地部署并启动了一个MySQL数据库。 如果你的数据库不在本地部署,你可以在(/nonebot_plugin_maimai_helper/util/utils.py)查询并替换数据库IP。

Description
A QQbot Based on Nonebot.
Readme MIT 205 MiB
Languages
Python 99.6%
PowerShell 0.4%