Skip to main content

ohh my bot!

Project description

nonebot

NoneBot Plugin OMB

Ohh My Bot!

License Python NoneBot

作用

通过patch on_commandon_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_omb-0.1.7.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

nonebot_plugin_omb-0.1.7-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_omb-0.1.7.tar.gz.

File metadata

  • Download URL: nonebot_plugin_omb-0.1.7.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

Hashes for nonebot_plugin_omb-0.1.7.tar.gz
Algorithm Hash digest
SHA256 726da140affb81a973fd472ef79ba6248bb7f6181d65fe2c691a983fdf7b18af
MD5 8da465953d17a194fbe667a922478528
BLAKE2b-256 38f7d751ec0a6582c31f311995768fb1e632eac00a108d4875f0d15b6aa96db8

See more details on using hashes here.

File details

Details for the file nonebot_plugin_omb-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: nonebot_plugin_omb-0.1.7-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

Hashes for nonebot_plugin_omb-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 116d68c384506bfc41dd26a82496487510a2c3729c772ea4ea7ab2cc39bf24c5
MD5 4fa07911f70ebf21e78e65761a08dece
BLAKE2b-256 14c1554f93563f9a5507149701fbd6769b00ca68930b381f8c88118f8a078934

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page