nonebot-plugin-orangejuice


Namenonebot-plugin-orangejuice JSON
Version 1.1.2 PyPI version JSON
download
home_pagehttps://github.com/GLDYM/nonebot-plugin-orangejuice
SummarySorabot Implemention
upload_time2025-07-27 13:35:55
maintainerNone
docs_urlNone
authorPolaris_Light
requires_python>=3.8
licenseMIT
keywords orangejuice
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://github.com/A-kirami/nonebot-plugin-template/blob/resources/nbp_logo.png" width="180" height="180" alt="NoneBotPluginLogo"></a>
  <br>
  <p><img src="https://github.com/A-kirami/nonebot-plugin-template/blob/resources/NoneBotPlugin.svg" width="240" alt="NoneBotPluginText"></p>
</div>

<div align="center">
# nonebot-plugin-orangejuice

_✨ [Sorabot](https://100oj.com/zh/%E5%B7%A5%E5%85%B7/SoraBot%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97)的Nonebot实现✨_

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

</div>

## 📖 介绍

[Sorabot](https://100oj.com/zh/%E5%B7%A5%E5%85%B7/SoraBot%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97)的 Nonebot 实现,提供 100% Orange Juice 的卡面查询、组卡器查询、数据统计、表情短码与相关的娱乐功能。

## 💿 安装

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

    nb plugin install nonebot-plugin-orangejuice

</details>

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

<details>
<summary>pip</summary>

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

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

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

    conda install nonebot-plugin-orangejuice
</details>

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

    plugins = ["nonebot_plugin_orangejuice"]

</details>

## 🎉 .env 配置

| 配置项       | 说明                             | 默认值       |
| ------------ | -------------------------------- | ------------ |
| OJ_DATA_PATH | 储存插件用户信息与配置文件的目录 | 'data/100oj' |
| MATCH_SCORE | 查卡与查图标时模糊匹配的最低分数 | 80 |

## 🎉 使用

与 [Sorabot](https://100oj.com/zh/%E5%B7%A5%E5%85%B7/SoraBot%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97) 的功能大致相似,指令头均为 \#。

<details open>
<summary>单独的命令</summary>

| 命令             | 说明                               |
| --------------  | --------------------------------- |
| #help           | 查看帮助信息。                     |
| #card \<name\>  | 查询橙汁卡牌信息,支持模糊搜索。 部分别名(如泥头车 -> 亚里希安罗妮)会使用插件内置的正则匹配表强制匹配。  |
| #icon \<name\>  | 查询橙汁卡牌图标,支持模糊搜索。 部分别名(如泥头车 -> 亚里希安罗妮)会使用插件内置的正则匹配表强制匹配。  |
| #deck \<code\>  | 获取卡组图片。后跟 12 位卡组代码。  |
| #m \<count\>    | 查询当前混合器与未来混合器。        |
| #lulu           | 模拟露露的幸运蛋。                 |
| #7              | 模拟浮游炮展开。                   |
| #mw             | 模拟奇迹漫步。                     |
| :\<emote\>:     | 发送橙汁表情。                     |

</details>

<details open>
<summary>橙汁数据查询</summary>

| 命令                                   | 说明                                                                                    |
| -------------------------------------  | --------------------------------------------------------------------------------------- |
| #stat                                  | 查看数据查询模块的帮助。                                                                   |
| #stat bind \<steam64id\>               | 用于将 steam 绑定到 qq。重复使用会更新绑定。                                                |
| #stat unbind                           | 删除自己的绑定。                                                                           |
| #stat me \[limit\]                     | 在绑定 steam 后,使用本命令来快速查询自己的数据。limit为显示的最高胜率角色数,可以不填,默认为5。|
| #stat \<steam64id\> \[limit\]          | 使用 steam64id 快速查询对应玩家的数据。                                                     |
| #stat \<@qq\> \[limit\]                | 通过 At 来查询对应玩家的统计数据。                                                          |
| #stat type \<id\>                      | 切换生成的统计图片样式。id目前可取0~7,其中0为初始样式。                                      |
| #stat pin \<id\>                       | 切换个人 pin 样式。                                                                        |
| #stats modify \<qq\> \<key\> \<value\> | 直接修改数据库中某个玩家的数据,用于给予 pin。仅 Bot 的所有者可用使用本命令。                   |

</details>

<details open>
<summary>管理模块</summary>

此模块命令仅群管理与 Bot 的所有者可以使用。带 groupid 参数的命令都需要合适的权限。

| 命令                                                      | 说明                                                                           |
| -------------------------------------------------------  | ------------------------------------------------------------------------------ |
| #ess module\|-m enable\|-on \<modulename\> \[groupid\]   | 在群聊\[groupid\]开启名为\[modulename\]的模块。不填写\[groupid\]时默认使用本群id。 |
| #ess module\|-m disable\|-off \<modulename\> \[groupid\] | 在群聊\[groupid\]关闭名为\[modulename\]的模块。不填写\[groupid\]时默认使用本群id。 |
| #ess module\|-m list\|-l \[groupid\]                     | 列出群聊\[groupid]的模块列表。不填写\[groupid\]时默认使用本群id。                  |
| #ess mute \<qq\|@qq\> \[time\] \[reason\]                | 禁言\[qq\]。time 如为纯数字,则单位为s;接受 `数字 + s m h d`。                    |
| #ess save\|-s                                            | 将当前所有配置保存到本地文件。                                                    |
| #ess load\|-l                                            | 从本地文件重新载入全部配置。                                                      |

</details>

## 特别感谢

- [nonebot/nonebot2](https://github.com/nonebot/nonebot2)
- [Fruitbat Factory](https://fruitbatfactory.com/)
- [Sorabot](https://100oj.com/zh/%E5%B7%A5%E5%85%B7/SoraBot%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97)
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/GLDYM/nonebot-plugin-orangejuice",
    "name": "nonebot-plugin-orangejuice",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "orangejuice",
    "author": "Polaris_Light",
    "author_email": "995905922@qq.com",
    "download_url": "https://files.pythonhosted.org/packages/81/50/a094a199c542100cc1e38fb2c977916b23f4a8c4643179f9f032a80786dc/nonebot_plugin_orangejuice-1.1.2.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n  <a href=\"https://v2.nonebot.dev/store\"><img src=\"https://github.com/A-kirami/nonebot-plugin-template/blob/resources/nbp_logo.png\" width=\"180\" height=\"180\" alt=\"NoneBotPluginLogo\"></a>\n  <br>\n  <p><img src=\"https://github.com/A-kirami/nonebot-plugin-template/blob/resources/NoneBotPlugin.svg\" width=\"240\" alt=\"NoneBotPluginText\"></p>\n</div>\n\n<div align=\"center\">\n# nonebot-plugin-orangejuice\n\n_\u2728 [Sorabot](https://100oj.com/zh/%E5%B7%A5%E5%85%B7/SoraBot%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97)\u7684Nonebot\u5b9e\u73b0\u2728_\n\n<a href=\"./LICENSE\">\n    <img src=\"https://img.shields.io/github/license/FDCraft/nonebot-plugin-orangejuice.svg\" alt=\"license\">\n</a>\n<a href=\"https://pypi.python.org/pypi/nonebot-plugin-orangejuice\">\n    <img src=\"https://img.shields.io/pypi/v/nonebot-plugin-orangejuice.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\udcd6 \u4ecb\u7ecd\n\n[Sorabot](https://100oj.com/zh/%E5%B7%A5%E5%85%B7/SoraBot%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97)\u7684 Nonebot \u5b9e\u73b0\uff0c\u63d0\u4f9b 100% Orange Juice \u7684\u5361\u9762\u67e5\u8be2\u3001\u7ec4\u5361\u5668\u67e5\u8be2\u3001\u6570\u636e\u7edf\u8ba1\u3001\u8868\u60c5\u77ed\u7801\u4e0e\u76f8\u5173\u7684\u5a31\u4e50\u529f\u80fd\u3002\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-orangejuice\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-orangejuice\n</details>\n<details>\n<summary>pdm</summary>\n\n    pdm add nonebot-plugin-orangejuice\n</details>\n<details>\n<summary>poetry</summary>\n\n    poetry add nonebot-plugin-orangejuice\n</details>\n<details>\n<summary>conda</summary>\n\n    conda install nonebot-plugin-orangejuice\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_orangejuice\"]\n\n</details>\n\n## \ud83c\udf89 .env \u914d\u7f6e\n\n| \u914d\u7f6e\u9879       | \u8bf4\u660e                             | \u9ed8\u8ba4\u503c       |\n| ------------ | -------------------------------- | ------------ |\n| OJ_DATA_PATH | \u50a8\u5b58\u63d2\u4ef6\u7528\u6237\u4fe1\u606f\u4e0e\u914d\u7f6e\u6587\u4ef6\u7684\u76ee\u5f55 | 'data/100oj' |\n| MATCH_SCORE | \u67e5\u5361\u4e0e\u67e5\u56fe\u6807\u65f6\u6a21\u7cca\u5339\u914d\u7684\u6700\u4f4e\u5206\u6570 | 80 |\n\n## \ud83c\udf89 \u4f7f\u7528\n\n\u4e0e [Sorabot](https://100oj.com/zh/%E5%B7%A5%E5%85%B7/SoraBot%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97) \u7684\u529f\u80fd\u5927\u81f4\u76f8\u4f3c\uff0c\u6307\u4ee4\u5934\u5747\u4e3a \\#\u3002\n\n<details open>\n<summary>\u5355\u72ec\u7684\u547d\u4ee4</summary>\n\n| \u547d\u4ee4             | \u8bf4\u660e                               |\n| --------------  | --------------------------------- |\n| #help           | \u67e5\u770b\u5e2e\u52a9\u4fe1\u606f\u3002                     |\n| #card \\<name\\>  | \u67e5\u8be2\u6a59\u6c41\u5361\u724c\u4fe1\u606f\uff0c\u652f\u6301\u6a21\u7cca\u641c\u7d22\u3002 \u90e8\u5206\u522b\u540d\uff08\u5982\u6ce5\u5934\u8f66 -> \u4e9a\u91cc\u5e0c\u5b89\u7f57\u59ae\uff09\u4f1a\u4f7f\u7528\u63d2\u4ef6\u5185\u7f6e\u7684\u6b63\u5219\u5339\u914d\u8868\u5f3a\u5236\u5339\u914d\u3002  |\n| #icon \\<name\\>  | \u67e5\u8be2\u6a59\u6c41\u5361\u724c\u56fe\u6807\uff0c\u652f\u6301\u6a21\u7cca\u641c\u7d22\u3002 \u90e8\u5206\u522b\u540d\uff08\u5982\u6ce5\u5934\u8f66 -> \u4e9a\u91cc\u5e0c\u5b89\u7f57\u59ae\uff09\u4f1a\u4f7f\u7528\u63d2\u4ef6\u5185\u7f6e\u7684\u6b63\u5219\u5339\u914d\u8868\u5f3a\u5236\u5339\u914d\u3002  |\n| #deck \\<code\\>  | \u83b7\u53d6\u5361\u7ec4\u56fe\u7247\u3002\u540e\u8ddf 12 \u4f4d\u5361\u7ec4\u4ee3\u7801\u3002  |\n| #m \\<count\\>    | \u67e5\u8be2\u5f53\u524d\u6df7\u5408\u5668\u4e0e\u672a\u6765\u6df7\u5408\u5668\u3002        |\n| #lulu           | \u6a21\u62df\u9732\u9732\u7684\u5e78\u8fd0\u86cb\u3002                 |\n| #7              | \u6a21\u62df\u6d6e\u6e38\u70ae\u5c55\u5f00\u3002                   |\n| #mw             | \u6a21\u62df\u5947\u8ff9\u6f2b\u6b65\u3002                     |\n| :\\<emote\\>:     | \u53d1\u9001\u6a59\u6c41\u8868\u60c5\u3002                     |\n\n</details>\n\n<details open>\n<summary>\u6a59\u6c41\u6570\u636e\u67e5\u8be2</summary>\n\n| \u547d\u4ee4                                   | \u8bf4\u660e                                                                                    |\n| -------------------------------------  | --------------------------------------------------------------------------------------- |\n| #stat                                  | \u67e5\u770b\u6570\u636e\u67e5\u8be2\u6a21\u5757\u7684\u5e2e\u52a9\u3002                                                                   |\n| #stat bind \\<steam64id\\>               | \u7528\u4e8e\u5c06 steam \u7ed1\u5b9a\u5230 qq\u3002\u91cd\u590d\u4f7f\u7528\u4f1a\u66f4\u65b0\u7ed1\u5b9a\u3002                                                |\n| #stat unbind                           | \u5220\u9664\u81ea\u5df1\u7684\u7ed1\u5b9a\u3002                                                                           |\n| #stat me \\[limit\\]                     | \u5728\u7ed1\u5b9a steam \u540e\uff0c\u4f7f\u7528\u672c\u547d\u4ee4\u6765\u5feb\u901f\u67e5\u8be2\u81ea\u5df1\u7684\u6570\u636e\u3002limit\u4e3a\u663e\u793a\u7684\u6700\u9ad8\u80dc\u7387\u89d2\u8272\u6570\uff0c\u53ef\u4ee5\u4e0d\u586b\uff0c\u9ed8\u8ba4\u4e3a5\u3002|\n| #stat \\<steam64id\\> \\[limit\\]          | \u4f7f\u7528 steam64id \u5feb\u901f\u67e5\u8be2\u5bf9\u5e94\u73a9\u5bb6\u7684\u6570\u636e\u3002                                                     |\n| #stat \\<@qq\\> \\[limit\\]                | \u901a\u8fc7 At \u6765\u67e5\u8be2\u5bf9\u5e94\u73a9\u5bb6\u7684\u7edf\u8ba1\u6570\u636e\u3002                                                          |\n| #stat type \\<id\\>                      | \u5207\u6362\u751f\u6210\u7684\u7edf\u8ba1\u56fe\u7247\u6837\u5f0f\u3002id\u76ee\u524d\u53ef\u53d60~7\uff0c\u5176\u4e2d0\u4e3a\u521d\u59cb\u6837\u5f0f\u3002                                      |\n| #stat pin \\<id\\>                       | \u5207\u6362\u4e2a\u4eba pin \u6837\u5f0f\u3002                                                                        |\n| #stats modify \\<qq\\> \\<key\\> \\<value\\> | \u76f4\u63a5\u4fee\u6539\u6570\u636e\u5e93\u4e2d\u67d0\u4e2a\u73a9\u5bb6\u7684\u6570\u636e\uff0c\u7528\u4e8e\u7ed9\u4e88 pin\u3002\u4ec5 Bot \u7684\u6240\u6709\u8005\u53ef\u7528\u4f7f\u7528\u672c\u547d\u4ee4\u3002                   |\n\n</details>\n\n<details open>\n<summary>\u7ba1\u7406\u6a21\u5757</summary>\n\n\u6b64\u6a21\u5757\u547d\u4ee4\u4ec5\u7fa4\u7ba1\u7406\u4e0e Bot \u7684\u6240\u6709\u8005\u53ef\u4ee5\u4f7f\u7528\u3002\u5e26 groupid \u53c2\u6570\u7684\u547d\u4ee4\u90fd\u9700\u8981\u5408\u9002\u7684\u6743\u9650\u3002\n\n| \u547d\u4ee4                                                      | \u8bf4\u660e                                                                           |\n| -------------------------------------------------------  | ------------------------------------------------------------------------------ |\n| #ess module\\|-m enable\\|-on \\<modulename\\> \\[groupid\\]   | \u5728\u7fa4\u804a\\[groupid\\]\u5f00\u542f\u540d\u4e3a\\[modulename\\]\u7684\u6a21\u5757\u3002\u4e0d\u586b\u5199\\[groupid\\]\u65f6\u9ed8\u8ba4\u4f7f\u7528\u672c\u7fa4id\u3002 |\n| #ess module\\|-m disable\\|-off \\<modulename\\> \\[groupid\\] | \u5728\u7fa4\u804a\\[groupid\\]\u5173\u95ed\u540d\u4e3a\\[modulename\\]\u7684\u6a21\u5757\u3002\u4e0d\u586b\u5199\\[groupid\\]\u65f6\u9ed8\u8ba4\u4f7f\u7528\u672c\u7fa4id\u3002 |\n| #ess module\\|-m list\\|-l \\[groupid\\]                     | \u5217\u51fa\u7fa4\u804a\\[groupid]\u7684\u6a21\u5757\u5217\u8868\u3002\u4e0d\u586b\u5199\\[groupid\\]\u65f6\u9ed8\u8ba4\u4f7f\u7528\u672c\u7fa4id\u3002                  |\n| #ess mute \\<qq\\|@qq\\> \\[time\\] \\[reason\\]                | \u7981\u8a00\\[qq\\]\u3002time \u5982\u4e3a\u7eaf\u6570\u5b57\uff0c\u5219\u5355\u4f4d\u4e3as\uff1b\u63a5\u53d7 `\u6570\u5b57 + s m h d`\u3002                    |\n| #ess save\\|-s                                            | \u5c06\u5f53\u524d\u6240\u6709\u914d\u7f6e\u4fdd\u5b58\u5230\u672c\u5730\u6587\u4ef6\u3002                                                    |\n| #ess load\\|-l                                            | \u4ece\u672c\u5730\u6587\u4ef6\u91cd\u65b0\u8f7d\u5165\u5168\u90e8\u914d\u7f6e\u3002                                                      |\n\n</details>\n\n## \u7279\u522b\u611f\u8c22\n\n- [nonebot/nonebot2](https://github.com/nonebot/nonebot2)\n- [Fruitbat Factory](https://fruitbatfactory.com/)\n- [Sorabot](https://100oj.com/zh/%E5%B7%A5%E5%85%B7/SoraBot%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97)",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Sorabot Implemention",
    "version": "1.1.2",
    "project_urls": {
        "Homepage": "https://github.com/GLDYM/nonebot-plugin-orangejuice"
    },
    "split_keywords": [
        "orangejuice"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "effd5b4ffdbc1c584585a24c3c2b9cf84c3123cde3e2160f01bdec3cc4b6fdaa",
                "md5": "2e959417c979653437a92021628d0ad5",
                "sha256": "3281607287eb8ed50fe9f6c30bb4a0ac204254211efca9cb77afa1f897c77b23"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_orangejuice-1.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2e959417c979653437a92021628d0ad5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 27138784,
            "upload_time": "2025-07-27T13:35:12",
            "upload_time_iso_8601": "2025-07-27T13:35:12.263887Z",
            "url": "https://files.pythonhosted.org/packages/ef/fd/5b4ffdbc1c584585a24c3c2b9cf84c3123cde3e2160f01bdec3cc4b6fdaa/nonebot_plugin_orangejuice-1.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8150a094a199c542100cc1e38fb2c977916b23f4a8c4643179f9f032a80786dc",
                "md5": "7fafafcb6baa3350639f1302cd8b706d",
                "sha256": "feb995107d4f80b894d9aaaa23a1e0ce4b4e0b49ac0c27513dea3a5bfe54b4e8"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_orangejuice-1.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "7fafafcb6baa3350639f1302cd8b706d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 26352551,
            "upload_time": "2025-07-27T13:35:55",
            "upload_time_iso_8601": "2025-07-27T13:35:55.238404Z",
            "url": "https://files.pythonhosted.org/packages/81/50/a094a199c542100cc1e38fb2c977916b23f4a8c4643179f9f032a80786dc/nonebot_plugin_orangejuice-1.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-27 13:35:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "GLDYM",
    "github_project": "nonebot-plugin-orangejuice",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "nonebot-plugin-orangejuice"
}
        
Elapsed time: 1.62100s