https://github.com/ffreemt/nonebot-plugin-guess-game
《猜猜看》nonebot2插件(Guess a name plugin for nonebot2)
https://github.com/ffreemt/nonebot-plugin-guess-game
nonebot nonebot2 plugin
Last synced: 12 months ago
JSON representation
《猜猜看》nonebot2插件(Guess a name plugin for nonebot2)
- Host: GitHub
- URL: https://github.com/ffreemt/nonebot-plugin-guess-game
- Owner: ffreemt
- Created: 2021-02-28T11:07:34.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-10-16T03:29:38.000Z (over 3 years ago)
- Last Synced: 2024-11-16T18:20:26.711Z (over 1 year ago)
- Topics: nonebot, nonebot2, plugin
- Language: Python
- Homepage:
- Size: 87.9 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nonebot-plugin-guess
[](https://v2.nonebot.dev/)[](https://adapter-onebot.netlify.app/)[](https://img.shields.io/static/v1?label=python+&message=3.7%2B&color=blue)[](https://github.com/psf/black)[](https://opensource.org/licenses/MIT)[](https://badge.fury.io/py/nonebot-plugin-guess)
《猜猜看》nonebot2插件(Guess a name plugin for nonebot2)
Field-tested with ``nonebot 2.0.0b2``
## 安装
```bash
pip install nonebot-plugin-guess
# pip install nonebot-plugin-guess -U # 升级到最新版
```
or
```bash
poetry add nonebot-plugin-guess
# poetry add nonebot-plugin-guess@latest # 升级到最新版
```
or
```
poetry add git+https://github.com/ffreemt/nonebot-plugin-guess-game.git
```
or
```
pip install git+https://github.com/ffreemt/nonebot-plugin-guess-game.git
```
or clone [https://github.com/ffreemt/nonebot-plugin-guess-game](https://github.com/ffreemt/nonebot-plugin-guess-game) and install from the repo.
## 使用
```python
# bot.py
...
nonebot.load_plugin("nonebot_plugin_guess")
...
```
然后在机器人所在的群里或给机器人发私信 `/guess` (或cai, 猜猜看, 猜)即可开始“猜猜看”游戏。
### 定制
插件自带的游戏数据仅限“猜城市名” 及固定的城市名:"上海", "北京", "广州", "深圳", "香港", "雅典", "西安", "长沙", "多伦多", "旧金山", "Zurich", "约翰内斯堡"; 最多猜的次数: 4
如需自己定制游戏,可在`.env` 里加入:
```bash
# .env
guess_name = "人名"
guess_max = 3
guess_name_list = ["贾宝玉", "林黛玉",]
```