📖 介绍
不知道怎么选择? 让bot帮你决定吧! ^ ^
(高仿以前小夜bot的roll功能)
💿 安装
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-sayoroll
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install nonebot-plugin-sayoroll
pdm
pdm add nonebot-plugin-sayoroll
poetry
poetry add nonebot-plugin-sayoroll
conda
conda install nonebot-plugin-sayoroll
打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入
plugins = ["nonebot_plugin_sayoroll"]
🎉 使用
指令表
/roll
直接roll会在1-100之间随机一个数字并返回(类似osu的roll)
/roll [数字]
带指定的数字的话则会从1到这个数字之间随机roll一个数字
/roll [x不x/x没x]
例如 /roll 我是不是耳聋
bot会在 我觉得你不是耳聋 和 我觉得你是耳聋 之间随机一个并返回。
/roll [xxx还是xxx] ...
例如 /roll 今晚刷pp还是摆烂
bot会在 当然是今晚刷pp咯 和 当然是摆烂咯 之间随机一个并返回。只允许两个词
/roll [参数] [参数] ...
例如 /roll 吃饭 睡觉 打游戏 运动 点蚊香
bot会在 吃饭 睡觉 打游戏 运动 点蚊香之间随机一个并返回。
可以是无限多的词
/roll xxx概率
例如 /roll 我今晚刷到pp的概率
只认参数结尾为 概率 这个词才可以触发,上面的例子会返回:
你今晚刷到pp的概率为:0.01-100%
Release files for nonebot-plugin-sayoroll 1.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nonebot_plugin_sayoroll-1.0.5.tar.gz | 16.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nonebot_plugin_sayoroll-1.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.9 kB
Release files / nonebot_plugin_sayoroll-1.0.5.tar.gz
| Download URL | nonebot_plugin_sayoroll-1.0.5.tar.gz |
|---|---|
| Size | 16.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
11675d41f2722cc30d6457a108b3344280ec9f0086a7d9928c21c0947e3f4e59
|
|
BLAKE2b-256 checksum How to use checksums |
80b1a92ad9a7af8fcb048501f1b3f1823a8230a43b43d3f51ce50c62b5ae7d56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|
Release files / nonebot_plugin_sayoroll-1.0.5-py3-none-any.whl
| Download URL | nonebot_plugin_sayoroll-1.0.5-py3-none-any.whl |
|---|---|
| Size | 16.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f4d0d7a0c8a49208bf6fa2ad8d156b5f3e28672c27bd69855c51bf7788a7b732
|
|
BLAKE2b-256 checksum How to use checksums |
d454298e1577e54f3ef7ff4b06bde272371ae36a01a44f472676b49ff2f94bbd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|