ohh my bot!
Project description
NoneBot Plugin OMB
Ohh My Bot!
作用
通过patch on_command
和 on_alconna
, 注入 SuperUserRule
- patch
on_command
使bot
只响应SuperUser
的命令
从
nonebot.plugin.on import on_command
导入的没法patch, 请使用nonebot.on_command
导入
- patch
on_alconna
使bot
只响应SuperUser
的消息
安装方式
依赖管理
pip install nonebot-plugin-omb
poetry add nonebot-plugin-omb
pdm add nonebot-plugin-omb
在
bot.py
中添加nonebot.load_plugin("nonebot_plugin_omb")
⚠️ 请确保 nonebot_plugin_omb
加载优先级高于其他插件
配置项
必要配置项
# 在 nonebot-plugin-alconna>=0.53.0 版本中, 推荐配置
ALCONNA_RESPONSE_SELF=True
# 记得配置 SUPERUSERS
# 仅测试下面这种配置方式
SUPERUSERS=["xxxxxx"]
依赖项
python = "^3.9"
nonebot2 = "^2.3.0"
nonebot-adapter-onebot = "^2.1.0"
nonebot-plugin-alconna = { version = ">=0.53.0", optional = true }
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
File details
Details for the file nonebot_plugin_omb-0.1.8.tar.gz
.
File metadata
- Download URL: nonebot_plugin_omb-0.1.8.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 439ac4071dfe41be6646a6166a5e588db800ad2a8f38f6fa0b5859d497d598bd |
|
MD5 | f9076442ba74f7f12b26f983fdba16ec |
|
BLAKE2b-256 | 55d40fe14014b8298ffd0cfb863d59595aba61eec2386a6f0843a15f6bf2347a |
File details
Details for the file nonebot_plugin_omb-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: nonebot_plugin_omb-0.1.8-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4e1353141d62e9e1a003cd2f53379a33c66cf239c376a11d056d12ba2fb367f |
|
MD5 | 62f69dd509c9816fafc60518fd815dd6 |
|
BLAKE2b-256 | f5e9a9f1f53c61e84525a47fae37661c0d0c4de81f38dc3bd8c0b95b97ef8bb7 |