<div align="center">
<img width="200" src="starving_logo.gif" alt="logo">
# What to Eat/Drink
_🧃🧋🍔🌮🍜🍮🍣🍻🍩 今天吃/喝什么 🍩🍻🍣🍮🍜🌮🍔🧋🧃_
</div>
<p align="center">
<a href="https://github.com/MinatoAquaCrews/nonebot_plugin_what2eat/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/MinatoAquaCrews/nonebot_plugin_what2eat?color=blue">
</a>
<a href="https://github.com/nonebot/nonebot2">
<img src="https://img.shields.io/badge/nonebot2-2.0.0rc1+-green">
</a>
<a href="https://github.com/MinatoAquaCrews/nonebot_plugin_what2eat/releases/tag/v0.3.6">
<img src="https://img.shields.io/github/v/release/MinatoAquaCrews/nonebot_plugin_what2eat?color=orange">
</a>
<a href="https://www.codefactor.io/repository/github/MinatoAquaCrews/nonebot_plugin_what2eat">
<img src="https://img.shields.io/codefactor/grade/github/MinatoAquaCrews/nonebot_plugin_what2eat/master?color=red">
</a>
<a href="https://github.com/MinatoAquaCrews/nonebot_plugin_what2eat">
<img src="https://img.shields.io/pypi/dm/nonebot_plugin_what2eat">
</a>
<a href="https://results.pre-commit.ci/latest/github/MinatoAquaCrews/nonebot_plugin_what2eat/master">
<img src="https://results.pre-commit.ci/badge/github/MinatoAquaCrews/nonebot_plugin_what2eat/master.svg" alt="pre-commit.ci status">
</a>
</p>
## 版本
[v0.3.6](https://github.com/MinatoAquaCrews/nonebot_plugin_what2eat/releases/tag/v0.3.6)
⚠ 适配nonebot2-2.0.0rc1+
##
1. 通过 `pip` 或 `nb` 安装;
2. 数据默认位于插件的 `./resource` 下 `eating.json`、`drinks.json` 与 `greetings.json`,菜品的附图储存于`./resource/img`下。可通过设置 `env` 下 `WHAT2EAT_PATH` 更改资源的路径:
```python
WHAT2EAT_PATH="your-path-to-resource"
```
## 功能
1. 🔥 选择恐惧症?让Bot建议你今天吃/喝什么!
👉 新增**鸳央咖啡**菜单!
2. **插件配置**
```python
WHAT2EAT_PATH="your-path-to-resource" # 资源路径
EATING_LIMIT=5 # 每个时段吃/喝什么次数上限,默认5次;每日6点、11点、17点、22点自动刷新
GREETING_GROUPS_ID=["123456789", "987654321"] # 默认开启小助手的群组,或{"123456789", "987654321"}
WHAT2EAT_AUTO_UPDATE=false # 启动时是否自动更新文本资源,默认关闭
```
3. 群管理可自行添加或移除群特色菜单(位于 `eating.json` 下 `[group_food][group_id]` );超管可添加或移除基础菜单( `[basic_food]` );
- 菜品**文字与配图一一对应**才视为相同的菜品,例如:文字相同而配图不同、文字与文字+配图、或文字不同而配图相同,这几种均视为不同菜品
- 当移除的菜品包含配图时,会一并移除相同配图的其他菜品
- 各群特色菜单相互独立;各群每个时间段询问Bot建议次数独立;Bot会综合各群菜单+基础菜单给出建议;
4. 吃饭小助手:每天7、12、15、18、22点群发问候语提醒群友吃饭/摸鱼/下班,`GREETING_GROUPS_ID` 以设置常开的群号列表,形如:
```python
GREETING_GROUPS_ID=["123456789", "987654321"] # 名字长防止与其他插件配置名相同
```
⚠ 群吃饭小助手启用配置存于 `greetings.json` 的 `groups_id` 字段
5. `WHAT2EAT_AUTO_UPDATE` 默认关闭,若开启,则插件在启动时自动更新文本资源,并尝试从仓库中下载 `eating.json`、`drinks.json`,并与本地对应的文本资源**合并**(若本地不存在,则保存至本地)。
```python
WHAT2EAT_AUTO_UPDATE=false
```
⚠ 使用 `raw.fgit.ml` 进行下载,不确保次次成功
## 命令
1. 吃什么:今天吃什么、中午吃啥、今晚吃啥、中午吃什么、晚上吃啥、晚上吃什么、夜宵吃啥……
2. 🔥 喝什么:今天喝什么、中午喝啥、今晚喝啥、中午喝什么、晚上喝啥、晚上喝什么、夜宵喝啥……
⚠ 与吃什么共用 `EATING_LIMIT` 次数
3. [管理员或超管] 添加或移除群菜名:[添加/移除 菜名];
💥 添加菜品与加菜可以附配图啦!
4. 查看群菜单:[菜单/群菜单/查看菜单];
5. [超管] 添加至基础菜单:[加菜 菜名];
6. 查看基础菜单:[基础菜单];
7. [管理员或超管] 开启/关闭吃饭小助手:[开启/启用/关闭/禁用小助手];
8. [管理员或超管] 添加/删除吃饭小助手问候语:[添加/删除/移除问候 时段 问候语];
⚠ 添加/移除问候操作可一步步进行,或一次性输入两或三个命令;可中途取消操作
## 效果
1. 示例1
Q:今晚吃什么
A:建议肯德基
Q:今晚喝啥
A:不如来杯 茶颜悦色 的 幽兰拿铁 吧!
Q:今晚吃什么
A:你今天已经吃得够多了!
Q:群菜单
A:
---群特色菜单---
alpha
beta
gamma
2. 示例2
[群管] Q:添加 派蒙
A:派蒙 已加入群特色菜单~
[超管] Q:加菜 东方馅挂炒饭
A:东方馅挂炒饭 已加入基础菜单~
[群管] Q:移除 东方馅挂炒饭
A:东方馅挂炒饭 在基础菜单中,非超管不可操作哦~
3. 示例3
[群管] Q:添加问候
A:请输入添加问候语的时段,可选:早餐/午餐/摸鱼/晚餐/夜宵,输入取消以取消操作
[群管] Q:摸鱼
A:请输入添加的问候语,输入取消以取消操作
[群管] Q:你好
A:你好 已加入 摸鱼问候~
## 本插件改自
[HoshinoBot-whattoeat](https://github.com/pcrbot/whattoeat)
部分菜名参考[程序员做饭指南](https://github.com/Anduin2017/HowToCook)
Raw data
{
"_id": null,
"home_page": "https://github.com/MinatoAquaCrews/nonebot_plugin_what2eat",
"name": "nonebot-plugin-what2eat",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "nonebot2,nonebot-plugin,What2eat,What2drink,MinatoAquaCrews",
"author": "KafCoppelia",
"author_email": "k740677208@gmail.com",
"download_url": "",
"platform": null,
"description": "<div align=\"center\">\n <img width=\"200\" src=\"starving_logo.gif\" alt=\"logo\">\n\n# What to Eat/Drink\n\n_\ud83e\uddc3\ud83e\uddcb\ud83c\udf54\ud83c\udf2e\ud83c\udf5c\ud83c\udf6e\ud83c\udf63\ud83c\udf7b\ud83c\udf69 \u4eca\u5929\u5403/\u559d\u4ec0\u4e48 \ud83c\udf69\ud83c\udf7b\ud83c\udf63\ud83c\udf6e\ud83c\udf5c\ud83c\udf2e\ud83c\udf54\ud83e\uddcb\ud83e\uddc3_\n\n</div>\n\n<p align=\"center\">\n\n <a href=\"https://github.com/MinatoAquaCrews/nonebot_plugin_what2eat/blob/master/LICENSE\">\n <img src=\"https://img.shields.io/github/license/MinatoAquaCrews/nonebot_plugin_what2eat?color=blue\">\n </a>\n\n <a href=\"https://github.com/nonebot/nonebot2\">\n <img src=\"https://img.shields.io/badge/nonebot2-2.0.0rc1+-green\">\n </a>\n\n <a href=\"https://github.com/MinatoAquaCrews/nonebot_plugin_what2eat/releases/tag/v0.3.6\">\n <img src=\"https://img.shields.io/github/v/release/MinatoAquaCrews/nonebot_plugin_what2eat?color=orange\">\n </a>\n\n <a href=\"https://www.codefactor.io/repository/github/MinatoAquaCrews/nonebot_plugin_what2eat\">\n <img src=\"https://img.shields.io/codefactor/grade/github/MinatoAquaCrews/nonebot_plugin_what2eat/master?color=red\">\n </a>\n\n <a href=\"https://github.com/MinatoAquaCrews/nonebot_plugin_what2eat\">\n <img src=\"https://img.shields.io/pypi/dm/nonebot_plugin_what2eat\">\n </a>\n\n <a href=\"https://results.pre-commit.ci/latest/github/MinatoAquaCrews/nonebot_plugin_what2eat/master\">\n\t<img src=\"https://results.pre-commit.ci/badge/github/MinatoAquaCrews/nonebot_plugin_what2eat/master.svg\" alt=\"pre-commit.ci status\">\n </a>\n\n</p>\n\n## \u7248\u672c\n\n[v0.3.6](https://github.com/MinatoAquaCrews/nonebot_plugin_what2eat/releases/tag/v0.3.6)\n\n\u26a0 \u9002\u914dnonebot2-2.0.0rc1+\n\n##\n\n1. \u901a\u8fc7 `pip` \u6216 `nb` \u5b89\u88c5\uff1b\n\n2. \u6570\u636e\u9ed8\u8ba4\u4f4d\u4e8e\u63d2\u4ef6\u7684 `./resource` \u4e0b `eating.json`\u3001`drinks.json` \u4e0e `greetings.json`\uff0c\u83dc\u54c1\u7684\u9644\u56fe\u50a8\u5b58\u4e8e`./resource/img`\u4e0b\u3002\u53ef\u901a\u8fc7\u8bbe\u7f6e `env` \u4e0b `WHAT2EAT_PATH` \u66f4\u6539\u8d44\u6e90\u7684\u8def\u5f84\uff1a\n\n ```python\n WHAT2EAT_PATH=\"your-path-to-resource\"\n ```\n\n## \u529f\u80fd\n\n1. \ud83d\udd25 \u9009\u62e9\u6050\u60e7\u75c7\uff1f\u8ba9Bot\u5efa\u8bae\u4f60\u4eca\u5929\u5403/\u559d\u4ec0\u4e48\uff01\n\n \ud83d\udc49 \u65b0\u589e**\u9e33\u592e\u5496\u5561**\u83dc\u5355\uff01\n\n2. **\u63d2\u4ef6\u914d\u7f6e**\n\n ```python\n WHAT2EAT_PATH=\"your-path-to-resource\" # \u8d44\u6e90\u8def\u5f84\n EATING_LIMIT=5 # \u6bcf\u4e2a\u65f6\u6bb5\u5403/\u559d\u4ec0\u4e48\u6b21\u6570\u4e0a\u9650\uff0c\u9ed8\u8ba45\u6b21\uff1b\u6bcf\u65e56\u70b9\u300111\u70b9\u300117\u70b9\u300122\u70b9\u81ea\u52a8\u5237\u65b0\n GREETING_GROUPS_ID=[\"123456789\", \"987654321\"] # \u9ed8\u8ba4\u5f00\u542f\u5c0f\u52a9\u624b\u7684\u7fa4\u7ec4\uff0c\u6216{\"123456789\", \"987654321\"}\n WHAT2EAT_AUTO_UPDATE=false # \u542f\u52a8\u65f6\u662f\u5426\u81ea\u52a8\u66f4\u65b0\u6587\u672c\u8d44\u6e90\uff0c\u9ed8\u8ba4\u5173\u95ed\n ```\n\n3. \u7fa4\u7ba1\u7406\u53ef\u81ea\u884c\u6dfb\u52a0\u6216\u79fb\u9664\u7fa4\u7279\u8272\u83dc\u5355\uff08\u4f4d\u4e8e `eating.json` \u4e0b `[group_food][group_id]` \uff09\uff1b\u8d85\u7ba1\u53ef\u6dfb\u52a0\u6216\u79fb\u9664\u57fa\u7840\u83dc\u5355\uff08 `[basic_food]` \uff09\uff1b\n\n - \u83dc\u54c1**\u6587\u5b57\u4e0e\u914d\u56fe\u4e00\u4e00\u5bf9\u5e94**\u624d\u89c6\u4e3a\u76f8\u540c\u7684\u83dc\u54c1\uff0c\u4f8b\u5982\uff1a\u6587\u5b57\u76f8\u540c\u800c\u914d\u56fe\u4e0d\u540c\u3001\u6587\u5b57\u4e0e\u6587\u5b57+\u914d\u56fe\u3001\u6216\u6587\u5b57\u4e0d\u540c\u800c\u914d\u56fe\u76f8\u540c\uff0c\u8fd9\u51e0\u79cd\u5747\u89c6\u4e3a\u4e0d\u540c\u83dc\u54c1\n\n - \u5f53\u79fb\u9664\u7684\u83dc\u54c1\u5305\u542b\u914d\u56fe\u65f6\uff0c\u4f1a\u4e00\u5e76\u79fb\u9664\u76f8\u540c\u914d\u56fe\u7684\u5176\u4ed6\u83dc\u54c1\n\n - \u5404\u7fa4\u7279\u8272\u83dc\u5355\u76f8\u4e92\u72ec\u7acb\uff1b\u5404\u7fa4\u6bcf\u4e2a\u65f6\u95f4\u6bb5\u8be2\u95eeBot\u5efa\u8bae\u6b21\u6570\u72ec\u7acb\uff1bBot\u4f1a\u7efc\u5408\u5404\u7fa4\u83dc\u5355+\u57fa\u7840\u83dc\u5355\u7ed9\u51fa\u5efa\u8bae\uff1b\n\n4. \u5403\u996d\u5c0f\u52a9\u624b\uff1a\u6bcf\u59297\u300112\u300115\u300118\u300122\u70b9\u7fa4\u53d1\u95ee\u5019\u8bed\u63d0\u9192\u7fa4\u53cb\u5403\u996d/\u6478\u9c7c/\u4e0b\u73ed\uff0c`GREETING_GROUPS_ID` \u4ee5\u8bbe\u7f6e\u5e38\u5f00\u7684\u7fa4\u53f7\u5217\u8868\uff0c\u5f62\u5982\uff1a\n\n ```python\n GREETING_GROUPS_ID=[\"123456789\", \"987654321\"]\t# \u540d\u5b57\u957f\u9632\u6b62\u4e0e\u5176\u4ed6\u63d2\u4ef6\u914d\u7f6e\u540d\u76f8\u540c\n ```\n\n \u26a0 \u7fa4\u5403\u996d\u5c0f\u52a9\u624b\u542f\u7528\u914d\u7f6e\u5b58\u4e8e `greetings.json` \u7684 `groups_id` \u5b57\u6bb5\n\n5. `WHAT2EAT_AUTO_UPDATE` \u9ed8\u8ba4\u5173\u95ed\uff0c\u82e5\u5f00\u542f\uff0c\u5219\u63d2\u4ef6\u5728\u542f\u52a8\u65f6\u81ea\u52a8\u66f4\u65b0\u6587\u672c\u8d44\u6e90\uff0c\u5e76\u5c1d\u8bd5\u4ece\u4ed3\u5e93\u4e2d\u4e0b\u8f7d `eating.json`\u3001`drinks.json`\uff0c\u5e76\u4e0e\u672c\u5730\u5bf9\u5e94\u7684\u6587\u672c\u8d44\u6e90**\u5408\u5e76**\uff08\u82e5\u672c\u5730\u4e0d\u5b58\u5728\uff0c\u5219\u4fdd\u5b58\u81f3\u672c\u5730\uff09\u3002\n\n ```python\n WHAT2EAT_AUTO_UPDATE=false\n ```\n\n \u26a0 \u4f7f\u7528 `raw.fgit.ml` \u8fdb\u884c\u4e0b\u8f7d\uff0c\u4e0d\u786e\u4fdd\u6b21\u6b21\u6210\u529f\n\n## \u547d\u4ee4\n\n1. \u5403\u4ec0\u4e48\uff1a\u4eca\u5929\u5403\u4ec0\u4e48\u3001\u4e2d\u5348\u5403\u5565\u3001\u4eca\u665a\u5403\u5565\u3001\u4e2d\u5348\u5403\u4ec0\u4e48\u3001\u665a\u4e0a\u5403\u5565\u3001\u665a\u4e0a\u5403\u4ec0\u4e48\u3001\u591c\u5bb5\u5403\u5565\u2026\u2026\n\n2. \ud83d\udd25 \u559d\u4ec0\u4e48\uff1a\u4eca\u5929\u559d\u4ec0\u4e48\u3001\u4e2d\u5348\u559d\u5565\u3001\u4eca\u665a\u559d\u5565\u3001\u4e2d\u5348\u559d\u4ec0\u4e48\u3001\u665a\u4e0a\u559d\u5565\u3001\u665a\u4e0a\u559d\u4ec0\u4e48\u3001\u591c\u5bb5\u559d\u5565\u2026\u2026\n\n \u26a0 \u4e0e\u5403\u4ec0\u4e48\u5171\u7528 `EATING_LIMIT` \u6b21\u6570\n\n3. [\u7ba1\u7406\u5458\u6216\u8d85\u7ba1] \u6dfb\u52a0\u6216\u79fb\u9664\u7fa4\u83dc\u540d\uff1a[\u6dfb\u52a0/\u79fb\u9664 \u83dc\u540d]\uff1b\n\n \ud83d\udca5 \u6dfb\u52a0\u83dc\u54c1\u4e0e\u52a0\u83dc\u53ef\u4ee5\u9644\u914d\u56fe\u5566\uff01\n\n4. \u67e5\u770b\u7fa4\u83dc\u5355\uff1a[\u83dc\u5355/\u7fa4\u83dc\u5355/\u67e5\u770b\u83dc\u5355]\uff1b\n\n5. [\u8d85\u7ba1] \u6dfb\u52a0\u81f3\u57fa\u7840\u83dc\u5355\uff1a[\u52a0\u83dc \u83dc\u540d]\uff1b\n\n6. \u67e5\u770b\u57fa\u7840\u83dc\u5355\uff1a[\u57fa\u7840\u83dc\u5355]\uff1b\n\n7. [\u7ba1\u7406\u5458\u6216\u8d85\u7ba1] \u5f00\u542f/\u5173\u95ed\u5403\u996d\u5c0f\u52a9\u624b\uff1a[\u5f00\u542f/\u542f\u7528/\u5173\u95ed/\u7981\u7528\u5c0f\u52a9\u624b]\uff1b\n\n8. [\u7ba1\u7406\u5458\u6216\u8d85\u7ba1] \u6dfb\u52a0/\u5220\u9664\u5403\u996d\u5c0f\u52a9\u624b\u95ee\u5019\u8bed\uff1a[\u6dfb\u52a0/\u5220\u9664/\u79fb\u9664\u95ee\u5019 \u65f6\u6bb5 \u95ee\u5019\u8bed]\uff1b\n\n \u26a0 \u6dfb\u52a0/\u79fb\u9664\u95ee\u5019\u64cd\u4f5c\u53ef\u4e00\u6b65\u6b65\u8fdb\u884c\uff0c\u6216\u4e00\u6b21\u6027\u8f93\u5165\u4e24\u6216\u4e09\u4e2a\u547d\u4ee4\uff1b\u53ef\u4e2d\u9014\u53d6\u6d88\u64cd\u4f5c\n\n## \u6548\u679c\n\n1. \u793a\u4f8b1\n\n Q\uff1a\u4eca\u665a\u5403\u4ec0\u4e48\n\n A\uff1a\u5efa\u8bae\u80af\u5fb7\u57fa\n\n Q\uff1a\u4eca\u665a\u559d\u5565\n\n A\uff1a\u4e0d\u5982\u6765\u676f \u8336\u989c\u60a6\u8272 \u7684 \u5e7d\u5170\u62ff\u94c1 \u5427\uff01\n\n Q\uff1a\u4eca\u665a\u5403\u4ec0\u4e48\n\n A\uff1a\u4f60\u4eca\u5929\u5df2\u7ecf\u5403\u5f97\u591f\u591a\u4e86\uff01\n\n Q\uff1a\u7fa4\u83dc\u5355\n\n A\uff1a\n\n ---\u7fa4\u7279\u8272\u83dc\u5355---\n\n alpha\n\n beta\n\n gamma\n\n2. \u793a\u4f8b2\n\n [\u7fa4\u7ba1] Q\uff1a\u6dfb\u52a0 \u6d3e\u8499\n\n A\uff1a\u6d3e\u8499 \u5df2\u52a0\u5165\u7fa4\u7279\u8272\u83dc\u5355~\n\n [\u8d85\u7ba1] Q\uff1a\u52a0\u83dc \u4e1c\u65b9\u9985\u6302\u7092\u996d\n\n A\uff1a\u4e1c\u65b9\u9985\u6302\u7092\u996d \u5df2\u52a0\u5165\u57fa\u7840\u83dc\u5355~\n\n [\u7fa4\u7ba1] Q\uff1a\u79fb\u9664 \u4e1c\u65b9\u9985\u6302\u7092\u996d\n\n A\uff1a\u4e1c\u65b9\u9985\u6302\u7092\u996d \u5728\u57fa\u7840\u83dc\u5355\u4e2d\uff0c\u975e\u8d85\u7ba1\u4e0d\u53ef\u64cd\u4f5c\u54e6~\n\n3. \u793a\u4f8b3\n\n [\u7fa4\u7ba1] Q\uff1a\u6dfb\u52a0\u95ee\u5019\n\n A\uff1a\u8bf7\u8f93\u5165\u6dfb\u52a0\u95ee\u5019\u8bed\u7684\u65f6\u6bb5\uff0c\u53ef\u9009\uff1a\u65e9\u9910/\u5348\u9910/\u6478\u9c7c/\u665a\u9910/\u591c\u5bb5\uff0c\u8f93\u5165\u53d6\u6d88\u4ee5\u53d6\u6d88\u64cd\u4f5c\n\n [\u7fa4\u7ba1] Q\uff1a\u6478\u9c7c\n\n A\uff1a\u8bf7\u8f93\u5165\u6dfb\u52a0\u7684\u95ee\u5019\u8bed\uff0c\u8f93\u5165\u53d6\u6d88\u4ee5\u53d6\u6d88\u64cd\u4f5c\n\n [\u7fa4\u7ba1] Q\uff1a\u4f60\u597d\n\n A\uff1a\u4f60\u597d \u5df2\u52a0\u5165 \u6478\u9c7c\u95ee\u5019~\n\n## \u672c\u63d2\u4ef6\u6539\u81ea\n\n[HoshinoBot-whattoeat](https://github.com/pcrbot/whattoeat)\n\n\u90e8\u5206\u83dc\u540d\u53c2\u8003[\u7a0b\u5e8f\u5458\u505a\u996d\u6307\u5357](https://github.com/Anduin2017/HowToCook)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Ask bot for what to eat or what to drink!",
"version": "0.3.6",
"split_keywords": [
"nonebot2",
"nonebot-plugin",
"what2eat",
"what2drink",
"minatoaquacrews"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6db0540acbef51b92a50456341fa2ffb8d104187e6105dd452bf294bc97be4e3",
"md5": "fa1cf6b627496dcbc737c89d03405209",
"sha256": "f143eb918c2894bb01b34dc02a9ad422fb31797c4b2c25903c31af591dff081d"
},
"downloads": -1,
"filename": "nonebot_plugin_what2eat-0.3.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fa1cf6b627496dcbc737c89d03405209",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 22046,
"upload_time": "2023-04-02T11:55:27",
"upload_time_iso_8601": "2023-04-02T11:55:27.491231Z",
"url": "https://files.pythonhosted.org/packages/6d/b0/540acbef51b92a50456341fa2ffb8d104187e6105dd452bf294bc97be4e3/nonebot_plugin_what2eat-0.3.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-02 11:55:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "MinatoAquaCrews",
"github_project": "nonebot_plugin_what2eat",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "nonebot-plugin-what2eat"
}