nonebot-plugin-fishing2


Namenonebot-plugin-fishing2 JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/GLDYM/nonebot-plugin-fishing2
Summary更好的电子钓鱼
upload_time2025-07-27 13:43:01
maintainerNone
docs_urlNone
authorALittleBot
requires_python>=3.8
licenseMIT
keywords fishing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
    <a href="https://v2.nonebot.dev/store">
    <img src="https://raw.githubusercontent.com/fllesser/nonebot-plugin-template/refs/heads/resource/.docs/NoneBotPlugin.svg" width="310" alt="logo"></a>

# nonebot-plugin-fishing2

_✨ 更好的电子钓鱼 ✨_

<a href="./LICENSE">
    <img src="https://img.shields.io/github/license/FDCraft/nonebot-plugin-fishing2.svg" alt="license">
</a>
<a href="https://pypi.python.org/pypi/nonebot-plugin-fishing2">
    <img src="https://img.shields.io/pypi/v/nonebot-plugin-fishing2.svg" alt="pypi">
</a>
<img src="https://img.shields.io/badge/python-3.8+-blue.svg" alt="python">

</div>

## 💿 安装

<details open>
<summary>使用 nb-cli 安装</summary>
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装

    nb plugin install nonebot-plugin-fishing2

</details>

<details>
<summary>使用包管理器安装</summary>
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令

<details>
<summary>pip</summary>

    pip install nonebot-plugin-fishing2
</details>
<details>
<summary>pdm</summary>

    pdm add nonebot-plugin-fishing2
</details>
<details>
<summary>poetry</summary>

    poetry add nonebot-plugin-fishing2
</details>
<details>
<summary>conda</summary>

    conda install nonebot-plugin-fishing2
</details>

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

    plugins = ["nonebot_plugin_fishing2"]

</details>

注意:安装过后,需在控制台输入 `nb orm upgrade` 指令以初始化数据库。本插件数据库与 [Nonebot-plugin-fishing](https://github.com/ALittleBot/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` 配置项说明如下。预设配置经过了计算以平衡,如果需要自行填表,请使用“钓鱼预测”命令进行预测。

```dotenv
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](https://github.com/lgc-NB2Dev/nonebot-plugin-picmenu-next)等帮助插件查看。管理员指令默认隐藏,只能由 SUPERUSER 发送“钓鱼帮助”查看。

### 赛博放生

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

## 📝 Todo

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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/GLDYM/nonebot-plugin-fishing2",
    "name": "nonebot-plugin-fishing2",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "fishing",
    "author": "ALittleBot",
    "author_email": "160833462+C14H22O@users.noreply.github.com",
    "download_url": "https://files.pythonhosted.org/packages/86/ba/46c54cc34711cb111d8efaf27e85b9c8f51ca3b20f5f74a3039728bbc5b9/nonebot_plugin_fishing2-0.1.1.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n    <a href=\"https://v2.nonebot.dev/store\">\n    <img src=\"https://raw.githubusercontent.com/fllesser/nonebot-plugin-template/refs/heads/resource/.docs/NoneBotPlugin.svg\" width=\"310\" alt=\"logo\"></a>\n\n# nonebot-plugin-fishing2\n\n_\u2728 \u66f4\u597d\u7684\u7535\u5b50\u9493\u9c7c \u2728_\n\n<a href=\"./LICENSE\">\n    <img src=\"https://img.shields.io/github/license/FDCraft/nonebot-plugin-fishing2.svg\" alt=\"license\">\n</a>\n<a href=\"https://pypi.python.org/pypi/nonebot-plugin-fishing2\">\n    <img src=\"https://img.shields.io/pypi/v/nonebot-plugin-fishing2.svg\" alt=\"pypi\">\n</a>\n<img src=\"https://img.shields.io/badge/python-3.8+-blue.svg\" alt=\"python\">\n\n</div>\n\n## \ud83d\udcbf \u5b89\u88c5\n\n<details open>\n<summary>\u4f7f\u7528 nb-cli \u5b89\u88c5</summary>\n\u5728 nonebot2 \u9879\u76ee\u7684\u6839\u76ee\u5f55\u4e0b\u6253\u5f00\u547d\u4ee4\u884c, \u8f93\u5165\u4ee5\u4e0b\u6307\u4ee4\u5373\u53ef\u5b89\u88c5\n\n    nb plugin install nonebot-plugin-fishing2\n\n</details>\n\n<details>\n<summary>\u4f7f\u7528\u5305\u7ba1\u7406\u5668\u5b89\u88c5</summary>\n\u5728 nonebot2 \u9879\u76ee\u7684\u63d2\u4ef6\u76ee\u5f55\u4e0b, \u6253\u5f00\u547d\u4ee4\u884c, \u6839\u636e\u4f60\u4f7f\u7528\u7684\u5305\u7ba1\u7406\u5668, \u8f93\u5165\u76f8\u5e94\u7684\u5b89\u88c5\u547d\u4ee4\n\n<details>\n<summary>pip</summary>\n\n    pip install nonebot-plugin-fishing2\n</details>\n<details>\n<summary>pdm</summary>\n\n    pdm add nonebot-plugin-fishing2\n</details>\n<details>\n<summary>poetry</summary>\n\n    poetry add nonebot-plugin-fishing2\n</details>\n<details>\n<summary>conda</summary>\n\n    conda install nonebot-plugin-fishing2\n</details>\n\n\u6253\u5f00 nonebot2 \u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u7684 `pyproject.toml` \u6587\u4ef6, \u5728 `[tool.nonebot]` \u90e8\u5206\u8ffd\u52a0\u5199\u5165\n\n    plugins = [\"nonebot_plugin_fishing2\"]\n\n</details>\n\n\u6ce8\u610f\uff1a\u5b89\u88c5\u8fc7\u540e\uff0c\u9700\u5728\u63a7\u5236\u53f0\u8f93\u5165 `nb orm upgrade` \u6307\u4ee4\u4ee5\u521d\u59cb\u5316\u6570\u636e\u5e93\u3002\u672c\u63d2\u4ef6\u6570\u636e\u5e93\u4e0e [Nonebot-plugin-fishing](https://github.com/ALittleBot/nonebot-plugin-fishing) \u901a\u7528\uff0c\u53ef\u4ee5\u4e92\u6362\u3002\n\n## \u2699\ufe0f \u914d\u7f6e\n\n\u5728 nonebot2 \u9879\u76ee\u7684`.env`\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4e0b\u8868\u4e2d\u7684\u914d\u7f6e\n\n| \u914d\u7f6e\u9879                    | \u5fc5\u586b | \u8bf4\u660e                                                           |\n|:-------------------------:|:----:|:--------------------------------------------------------------:|\n| fishes                    | \u5426   | \u9c7c\u5858\u5185\u7684\u666e\u901a\u9c7c\uff08\u5927\u6982\u662f\u9c7c\u2026\u2026\uff09                                   |\n| fishing_achievement       | \u5426   | \u9493\u9c7c\u6210\u5c31                                                       |\n| fishing_coin_name         | \u5426   | \u5356\u9c7c\u83b7\u53d6\u7684\u8d27\u5e01\u540d\u79f0                                             |\n| fishing_cooldown_time_min | \u5426   | \u9493\u9c7c\u51b7\u5374\u4e0b\u9650\uff0c\u5355\u4f4d\u4e3a\u79d2                                         |\n| fishing_cooldown_time_max | \u5426   | \u9493\u9c7c\u51b7\u5374\u4e0a\u9650                                                   |\n| punish_limit              | \u5426   | \u77ed\u65f6\u95f4\u591a\u6b21\u9493\u9c7c\u540e\uff0c\u7981\u8a00\u6240\u9700\u6b21\u6570\uff0c\u9632\u6b62\u5237\u5c4f                       |\n| special_fish_enabled      | \u5426   | \u662f\u5426\u542f\u7528\u8d5b\u535a\u653e\u751f & \u7279\u6b8a\u9c7c\uff08\u9ed8\u8ba4\u4e3a\u5426\uff09                          |\n| special_fish_price        | \u5426   | \u7279\u6b8a\u9c7c\u51fa\u552e\u7684\u4ef7\u683c                                               |\n| special_fish_free_price   | \u5426   | \u7279\u6b8a\u9c7c\u653e\u751f\u7684\u4ef7\u683c                                               |\n| special_fish_probability  | \u5426   | \u9493\u4e0a\u7279\u6b8a\u9c7c\u7684\u6982\u7387\uff0c\u6ce8\u610f\u8fd9\u4e2a\u5224\u5b9a\u5728\u7a7a\u519b\u5224\u5b9a\u4e4b\u540e                   |\n| no_fish_probability       | \u5426   | \u7a7a\u519b\u7684\u6982\u7387                                                     |\n| rare_fish_weight          | \u5426   | \u7a00\u6709\u9c7c\u6743\u91cd\u5206\u754c\u7ebf\uff0c\u5f71\u54cd rare_fish \u5c5e\u6027\u4e0e normal_fish \u5c5e\u6027\u7684\u533a\u5206 |\n| buy_rate                  | \u5426   | \u5728\u4e0d\u6307\u5b9a buy_price \u65f6\uff0c\u8d2d\u4e70\u4ef7\u683c/\u57fa\u51c6\u4ef7\u683c\u6bd4\uff0c\u5e94\u5927\u4e8e 1           |\n| backpack_forward          | \u5426   | \u80cc\u5305\u662f\u5426\u4f7f\u7528\u804a\u5929\u8bb0\u5f55                                           |\n\n\u5176\u4e2d `fishes` \u914d\u7f6e\u9879\u8bf4\u660e\u5982\u4e0b\u3002\u9884\u8bbe\u914d\u7f6e\u7ecf\u8fc7\u4e86\u8ba1\u7b97\u4ee5\u5e73\u8861\uff0c\u5982\u679c\u9700\u8981\u81ea\u884c\u586b\u8868\uff0c\u8bf7\u4f7f\u7528\u201c\u9493\u9c7c\u9884\u6d4b\u201d\u547d\u4ee4\u8fdb\u884c\u9884\u6d4b\u3002\n\n```dotenv\nFISHES='\n    [\n        {\n            \"type\": \"fish\", # \u7c7b\u578b\uff0c\u5fc5\u586b\uff0c\u53ef\u7528\u503c\uff1afish, item\uff0c\u540c\u7c7b\u578b\u7269\u54c1\u4e0d\u80fd\u540c\u65f6\u4f5c\u4e3a\u9c7c\u9975\n            \"name\": \"\u5c0f\u9c7c\", # \u540d\u79f0\uff0c\u5fc5\u586b\n            \"price\": 15, # \u57fa\u51c6\u4ef7\u683c\uff0c\u5fc5\u586b\n            \"amount\": 1, # \u5355\u4efd\u6570\u91cf\uff0c\u6a21\u62df\u8010\u4e45\n            \"props\": [ # \u5c5e\u6027\uff0c\u9009\u586b\uff0c\u4f5c\u4e3a\u9c7c\u9975\u65f6\u6539\u53d8\n                {\n                    \"type\": \"rm_fish\", # \u53ef\u7528\u503c: rare_fish, normal_fish, fish, rm_fish, special_fish, no_fish\n                    \"key\": \"\u5c0f\u9c7c\", # \u5982\u679c\u4e3a fish \u6216 rm_fish\uff0c\u9700\u8981\u586b\u5199\u9c7c\u540d\n                    \"value\": 0 # \u5982\u679c\u4e3a rare_fish, normal_fish, fish\uff0c\u586b\u5199\u6743\u91cd\uff1b\u5982\u679c\u4e3a special_fish, no_fish\uff0c\u586b\u5199\u6982\u7387\n                }\n            ],\n            \"description\": \"\u4e00\u6761\u5c0f\u9c7c\u3002\u628a\u5b83\u5f53\u505a\u9c7c\u9975\u53ef\u4ee5\u9632\u6b62\u9493\u5230\u5c0f\u9c7c\u3002\", # \u63cf\u8ff0\uff0c\u5fc5\u586b\n            \"can_catch\": True, # \u662f\u5426\u53ef\u4ee5\u6293\u53d6\uff0c\u5fc5\u586b\n            \"sleep_time\": 2, # \u9493\u4e0a\u6765\u9700\u8981\u7684\u65f6\u95f4\uff0c\u9ed8\u8ba4 60\n            \"weight\": 1000, # \u6743\u91cd\n            \"can_buy\": True, # \u662f\u5426\u53ef\u4ee5\u8d2d\u4e70\uff0c\u5fc5\u586b\n            \"buy_price\": 50, # \u8d2d\u4e70\u4ef7\u683c\n            \"can_sell\": True # \u662f\u5426\u53ef\u4ee5\u51fa\u552e\uff0c\u5fc5\u586b\n        },\n    ]\n'\n```\n\n## \ud83d\udd28 \u66f4\u65b0\n\n\u6bcf\u4e00\u6b21\u66f4\u65b0\u540e\uff0c\u9700\u6267\u884c `nb orm upgrade`\u3002\n\n## \ud83c\udf89 \u4f7f\u7528\n\n### \u6307\u4ee4\u8868\n\n\u5728\u7fa4\u804a\u6216\u79c1\u804a\u53d1\u9001\u201c\u9493\u9c7c\u5e2e\u52a9\u201d\u67e5\u770b\u672c\u63d2\u4ef6\u7684\u5e2e\u52a9\uff0c\u6216\u8005\u4f7f\u7528[NoneBot-Plugin-PicMenu-Next](https://github.com/lgc-NB2Dev/nonebot-plugin-picmenu-next)\u7b49\u5e2e\u52a9\u63d2\u4ef6\u67e5\u770b\u3002\u7ba1\u7406\u5458\u6307\u4ee4\u9ed8\u8ba4\u9690\u85cf\uff0c\u53ea\u80fd\u7531 SUPERUSER \u53d1\u9001\u201c\u9493\u9c7c\u5e2e\u52a9\u201d\u67e5\u770b\u3002\n\n### \u8d5b\u535a\u653e\u751f\n\n\u5f53\u7528\u6237\u4f7f\u7528\u8d27\u5e01\u653e\u751f\u7531\u81ea\u5df1\u53d6\u540d\u7684\u4e00\u6761\u9c7c\u540e\uff0c\u6bcf\u4e2a\u7528\u6237\u5728\u9493\u9c7c\u65f6\u90fd\u6709\u673a\u4f1a\u9493\u5230\u90a3\u4e00\u6761\u9c7c\u3002\u4f46\u6b64\u529f\u80fd\u5f00\u5173 `special_fish_enabled` \u9ed8\u8ba4\u5173\u95ed\uff0c\u539f\u56e0\u662f\u7528\u6237\u751f\u6210\u5185\u5bb9\u5982\u679c\u4e0d\u7b26\u5408\u89c4\u8303\uff0c\u53ef\u80fd\u5bfc\u81f4\u51fa\u73b0\u4e0d\u53ef\u9884\u6599\u7684\u60c5\u51b5\uff0c\u8bf7\u8c28\u614e\u5f00\u542f\u3002\n\n## \ud83d\udcdd Todo\n\n- [x] \u91cd\u5199\u6570\u636e\u5e93\u903b\u8f91\uff08\u6539\u4e3a\u4f7f\u7528 [nonebot/plugin-orm](https://github.com/nonebot/plugin-orm)\uff09\n- [x] \u589e\u52a0\u7cfb\u7edf\u5546\u5e97\uff0c\u5356\u51fa\u9493\u5230\u7684\u9c7c\n- [x] \u8d5b\u535a\u653e\u751f [#4](https://github.com/C14H22O/nonebot-plugin-fishing/issues/4) \uff08\u5df2\u57fa\u672c\u5b8c\u6210\uff09\n- [ ] ~~\u4f7f\u7528 [nonebot_plugin_chikari_economy](https://github.com/mrqx0195/nonebot_plugin_chikari_economy) \u7ecf\u6d4e\u7cfb\u7edf~~ \n- [x] \u4e3a\u9c7c\u7aff\u589e\u52a0\u8010\u4e45\u5ea6\uff0c\u8010\u4e45\u5ea6\u4e3a0\u65f6\u9700\u91cd\u65b0\u8d2d\u4e70\u9c7c\u7aff\n- [x] \u4e3a\u9493\u9c7c\u80cc\u5305\u6dfb\u52a0\u6392\u5e8f\n- [x] \u6dfb\u52a0\u6210\u5c31\u7cfb\u7edf\n- [x] \u4e70\u88c5\u5907\uff01\n- [x] \u652f\u6301\u5356\u4e0e\u666e\u901a\u9c7c\u540c\u540d\u7684\u7279\u6b8a\u9c7c\n- [x] \u7ba1\u7406\u5458\u547d\u4ee4\uff1a\u635e\u9c7c\n- [ ] \u5c4f\u853d\u8bcd\u5e93\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "\u66f4\u597d\u7684\u7535\u5b50\u9493\u9c7c",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/GLDYM/nonebot-plugin-fishing2"
    },
    "split_keywords": [
        "fishing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d7f10da6190947ba8fc6f6b624eade50b08427e142d00708deefdd9b387beb68",
                "md5": "a99604fe477ec1901bd44c96edf2ee4a",
                "sha256": "16153d8fc46bae2c00d27b708469cec9edb6877314dc8bd57a83887955df9fb4"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_fishing2-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a99604fe477ec1901bd44c96edf2ee4a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 24430,
            "upload_time": "2025-07-27T13:42:58",
            "upload_time_iso_8601": "2025-07-27T13:42:58.843460Z",
            "url": "https://files.pythonhosted.org/packages/d7/f1/0da6190947ba8fc6f6b624eade50b08427e142d00708deefdd9b387beb68/nonebot_plugin_fishing2-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "86ba46c54cc34711cb111d8efaf27e85b9c8f51ca3b20f5f74a3039728bbc5b9",
                "md5": "47541bb33d3e24d6e8c8b5222800bdbd",
                "sha256": "f0fe98dc1212e4d7f15cb4ecee10fa767cfadc80ec83cfe54de54503ba4fe036"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_fishing2-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "47541bb33d3e24d6e8c8b5222800bdbd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 19642,
            "upload_time": "2025-07-27T13:43:01",
            "upload_time_iso_8601": "2025-07-27T13:43:01.067124Z",
            "url": "https://files.pythonhosted.org/packages/86/ba/46c54cc34711cb111d8efaf27e85b9c8f51ca3b20f5f74a3039728bbc5b9/nonebot_plugin_fishing2-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-27 13:43:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "GLDYM",
    "github_project": "nonebot-plugin-fishing2",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "nonebot-plugin-fishing2"
}
        
Elapsed time: 1.15469s