基于NoneBot的高仿以前小夜bot的roll功能
Project description
📖 介绍
不知道怎么选择? 让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%
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for nonebot-plugin-sayoroll-1.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c67227de1b44260d548dc47e43daff3a5f695768deafa685b0b892a6cb7f153 |
|
MD5 | ca8eb22eeb8a57cb0c000f4cc6f91be9 |
|
BLAKE2b-256 | 4e89a38cd2ae5feab04d625d6c31af65ed9abf34bed8e34d7c4d1c3d6af3403c |
Close
Hashes for nonebot_plugin_sayoroll-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2186a696e7c2d97ecfebe893fe7a46767d4be4e243a318f6d4374290b8631ba6 |
|
MD5 | 8f0e6c577811bcb198773f3aafcdf43d |
|
BLAKE2b-256 | f266fa4780e6df7b7b025c96b20121385e5dd0467c09059f8fa14e7db863d6ce |