你甚至可以电子钓鱼
Project description
💿 安装
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-fishing
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install nonebot-plugin-fishing
pdm
pdm add nonebot-plugin-fishing
poetry
poetry add nonebot-plugin-fishing
conda
conda install nonebot-plugin-fishing
打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入
plugins = ["nonebot_plugin_fishing"]
注意:安装过后,需在控制台输入 nb orm upgrade 指令以初始化数据库。
⚙️ 配置
在 nonebot2 项目的.env文件中添加下表中的必填配置
| 配置项 | 必填 | 说明 |
|---|---|---|
| fishes | 否 | 配置鱼塘内鱼们的名称、权重、等待时间和价格 |
| fishing_limit | 否 | 填入每次钓鱼后,限制钓鱼的秒数 |
| fishing_coin_name | 否 | 填入卖鱼获取的货币名称 |
| special_fish_enabled | 否 | 是否启用赛博放生功能(默认为否) |
| special_fish_price | 否 | 每放生一次所需的货币数量 |
| special_fish_probability | 否 | 钓鱼时钓到用户放生的鱼的概率 |
其中 fishes 配置项说明如下:
[
{
"name": "小鱼", # 鱼的名称
"frequency": 2, # 鱼上钩的时间
"weight": 100, # 权重
"price": 2 # 价格
}
]
🔨 更新
每一次更新后,需执行 nb orm upgrade。
由于此前版本数据库迁移存在问题,故插件无法对 v0.2.1 版本及以前的数据进行迁移。
🎉 使用
指令表
| 指令 | 范围 | 说明 |
|---|---|---|
| 钓鱼 | 所有 | 放下鱼竿 |
| 统计信息 | 所有 | 查看钓鱼次数 |
| 背包 | 所有 | 查看背包 |
| 卖鱼 | 所有 | 卖鱼 |
| 余额 | 所有 | 查看当前余额 |
| 放生 | 所有 | 赛博放生 |
赛博放生
当用户使用货币放生由自己取名的一条鱼后,每个用户在钓鱼时都有机会钓到那一条鱼。但此功能开关 special_fish_enabled 默认关闭,原因是用户生成内容如果不符合规范,可能导致出现不可预料的情况,请谨慎开启。
🔨 更新
每一次升级后,都需执行 nb orm upgrade。
📝 Todo
- 重写数据库逻辑(改为使用 nonebot/plugin-orm)
- 增加系统商店,卖出钓到的鱼们
- 赛博放生 #4
- 为鱼竿增加耐久度,耐久度为0时需重新购买鱼竿
- 为钓鱼背包添加排序
- 添加成就系统
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nonebot_plugin_fishing-0.2.3.tar.gz.
File metadata
- Download URL: nonebot_plugin_fishing-0.2.3.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9eb17a15cbb1272e38fed497de8253d5e71ab46579d9c13487875d34e0fa298
|
|
| MD5 |
d7cf2eac3a6e34610453798be37c8edb
|
|
| BLAKE2b-256 |
f798cec56e4ace230dbe16264baf8c45cdd5743e52a3ec32dc64145185525eba
|
File details
Details for the file nonebot_plugin_fishing-0.2.3-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_fishing-0.2.3-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cf75d8d03055497798ddde387f7c9256767ac474be41e420be9a17d76db7bde
|
|
| MD5 |
c068dfcd7646dd90f60bff52a3439af2
|
|
| BLAKE2b-256 |
1d0dd65395f6e361d8b2497ce2841cfdcb43066ac436a89b7ab6fae90cb93304
|