Skip to main content

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 的消息
  • ExtensionExecutor.globals.append(OmbExtension), 判断是否为 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 版本中, 推荐配置(响应Bot的消息)
ALCONNA_RESPONSE_SELF=True

# 记得配置 SUPERUSERS
SUPERUSERS=["xxxxxx"]

依赖项

python = "^3.9"
nonebot2 = "^2.3.0"
nonebot-plugin-alconna = { version = ">=0.53.0", optional = true }

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.9.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_omb-0.1.9-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nonebot_plugin_omb-0.1.9.tar.gz
  • Upload date:
  • Size: 4.1 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.9.tar.gz
Algorithm Hash digest
SHA256 70e71503a9d451c9ee06e25e11d33d17edd5cd57e1e43919f9282330f90064b5
MD5 2458590518b1cf53f048bc7fcedb6d8c
BLAKE2b-256 1cd1568f7d489b8d7843e7628db11f812ec12c1bfb65b97eac7a1afe3faf6aa0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nonebot_plugin_omb-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 5.3 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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 8ec4f1c145d1ea65c57ecab36c22ac11a7960781f380f912f8f7e857cceed6dd
MD5 915b57dcf07e5cc33e92e8caa8067492
BLAKE2b-256 49279021bab192b19332963b71f9a4c920ce51d0c2caed7242d1798e4434d5e7

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.9 This release

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page