Skip to main content
logo

nonebot-plugin-fishing2

✨ 更好的电子钓鱼 ✨

license pypi python

💿 安装

使用 nb-cli 安装 在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-fishing2
使用包管理器安装 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
pip
pip install nonebot-plugin-fishing2
pdm
pdm add nonebot-plugin-fishing2
poetry
poetry add nonebot-plugin-fishing2
conda
conda install nonebot-plugin-fishing2

打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入

plugins = ["nonebot_plugin_fishing2"]

注意:安装过后,需在控制台输入 nb orm upgrade 指令以初始化数据库。本插件数据库与 Nonebot-plugin-fishing 通用,可以互换。

⚙️ 配置

在 nonebot2 项目的.env文件中添加下表中的配置

配置项 必填 说明
fishes 否 鱼塘内的普通鱼(大概是鱼……)
fishing_achievement 否 钓鱼成就
fishing_coin_name 否 卖鱼获取的货币名称
fishing_cooldown_time_min 否 钓鱼冷却下限,单位为秒
fishing_cooldown_time_max 否 钓鱼冷却上限
punish_limit 否 短时间多次钓鱼后,禁言所需次数,防止刷屏
special_fish_enabled 否 是否启用赛博放生 & 特殊鱼(默认为否)
special_fish_price 否 特殊鱼出售的价格
special_fish_free_price 否 特殊鱼放生的价格
special_fish_probability 否 钓上特殊鱼的概率,注意这个判定在空军判定之后
no_fish_probability 否 空军的概率
rare_fish_weight 否 稀有鱼权重分界线,影响 rare_fish 属性与 normal_fish 属性的区分
buy_rate 否 在不指定 buy_price 时,购买价格/基准价格比,应大于 1
backpack_forward 否 背包是否使用聊天记录

其中 fishes 配置项说明如下。预设配置经过了计算以平衡,如果需要自行填表,请使用“钓鱼预测”命令进行预测。

FISHES='
    [
        {
            "type": "fish", # 类型,必填,可用值:fish, item,同类型物品不能同时作为鱼饵
            "name": "小鱼", # 名称,必填
            "price": 15, # 基准价格,必填
            "amount": 1, # 单份数量,模拟耐久
            "props": [ # 属性,选填,作为鱼饵时改变
                {
                    "type": "rm_fish", # 可用值: rare_fish, normal_fish, fish, rm_fish, special_fish, no_fish
                    "key": "小鱼", # 如果为 fish 或 rm_fish,需要填写鱼名
                    "value": 0 # 如果为 rare_fish, normal_fish, fish,填写权重;如果为 special_fish, no_fish,填写概率
                }
            ],
            "description": "一条小鱼。把它当做鱼饵可以防止钓到小鱼。", # 描述,必填
            "can_catch": True, # 是否可以抓取,必填
            "sleep_time": 2, # 钓上来需要的时间,默认 60
            "weight": 1000, # 权重
            "can_buy": True, # 是否可以购买,必填
            "buy_price": 50, # 购买价格
            "can_sell": True # 是否可以出售,必填
        },
    ]
'

🔨 更新

每一次更新后,需执行 nb orm upgrade。

🎉 使用

指令表

在群聊或私聊发送“钓鱼帮助”查看本插件的帮助,或者使用NoneBot-Plugin-PicMenu-Next等帮助插件查看。管理员指令默认隐藏,只能由 SUPERUSER 发送“钓鱼帮助”查看。

赛博放生

当用户使用货币放生由自己取名的一条鱼后,每个用户在钓鱼时都有机会钓到那一条鱼。但此功能开关 special_fish_enabled 默认关闭,原因是用户生成内容如果不符合规范,可能导致出现不可预料的情况,请谨慎开启。

📝 Todo

  • 重写数据库逻辑(改为使用 nonebot/plugin-orm)
  • 增加系统商店,卖出钓到的鱼
  • 赛博放生 #4 (已基本完成)
  • 使用 nonebot_plugin_chikari_economy 经济系统
  • 为鱼竿增加耐久度,耐久度为0时需重新购买鱼竿
  • 为钓鱼背包添加排序
  • 添加成就系统
  • 买装备!
  • 支持卖与普通鱼同名的特殊鱼
  • 管理员命令:捞鱼

Metadata

Release files for nonebot-plugin-fishing2 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nonebot-plugin-fishing2 1.0.2
File Size Uploaded Provenance
nonebot_plugin_fishing2-1.0.2.tar.gz 21.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-plugin-fishing2 1.0.2
File Interpreter ABI Platform
nonebot_plugin_fishing2-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 45.6 kB

Release files / nonebot_plugin_fishing2-1.0.2.tar.gz

Download URL nonebot_plugin_fishing2-1.0.2.tar.gz
Size 21.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ee1211ce07be0385186a8084072afc7c133578319b642d1bc3724612a77c8c85
BLAKE2b-256 checksum
How to use checksums
aaa19a0b289ffcade8ff92b6d61ab724f1b8d8e42e018a01ca0ac72715c97085
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 17, 2026.

Transparency log

Release files / nonebot_plugin_fishing2-1.0.2-py3-none-any.whl

Download URL nonebot_plugin_fishing2-1.0.2-py3-none-any.whl
Size 24.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
923954bb9b887207086f779f3d9c57727485d7ab19e371abaad3ecb23ab2907d
BLAKE2b-256 checksum
How to use checksums
1c0f7704c54504918a48770d148f90be9ad0a2c2a81d523f3b10ddf90eadc12d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 17, 2026.

Transparency log

Security for nonebot-plugin-fishing2 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nonebot_plugin_fishing2-1.0.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page