Skip to main content

Bot的消息也是消息!

Project description

nonebot

NoneBot Plugin MMM

License Python NoneBot

:eya46

作用

onebot v11 协议中 bot 的消息作为正常事件进行处理

小心死循环!

使用 plugin-alconna 记得添加 ALCONNA_RESPONSE_SELF=True 配置

原因: https://github.com/nonebot/plugin-alconna/releases/tag/v0.53.0

安装方式

依赖管理

  • pip install nonebot-plugin-mmm
  • poetry add nonebot-plugin-mmm
  • pdm add nonebot-plugin-mmm

bot.py 中添加 nonebot.load_plugin("nonebot_plugin_mmm")

nb-cli

  • nb plugin install nonebot-plugin-mmm

配置项

非必要配置项

  • mmm_block: 是否block message_sent 后续matcher, 默认为 True
  • mmm_priority: on message_sent 的优先级, 默认为 0
  • mmm_private: 是否处理私聊消息, 默认为 True
  • mmm_group: 是否处理群聊消息, 默认为 True
  • mmm_self: 是否处理自己发给自己的消息, 默认为 False
  • mmm_only_text: 是否只处理文本消息, 默认为 False
  • mmm_text_check: 是否只处理符合指定开头的消息, 默认为 False
  • mmm_use_nb_start 是否使用 nonebot2COMMAND_START, 默认为 False
  • mmm_text_start: 检查的消息开头, 默认为 {"",} 即任何消息都通过
  • mmm_lstrip: 是否去除消息前缀, 默认为 False
  • mmm_lstrip_num: 去除消息前缀的数量, 默认为 1
mmm_block = True
mmm_priority = 0
mmm_private = True
mmm_group = True
mmm_self = False

mmm_only_text = False # 只处理文本消息
mmm_text_check = False # 只处理符合指定开头的消息
mmm_use_nb_start = False # 使用 nonebot2  COMMAND_START
mmm_text_start = [".", "/"] # 检查的消息开头 默认为 ["",] 即任何消息都通过
mmm_lstrip = False # 去除消息前缀
mmm_lstrip_num = 1 # 去除消息前缀的数量

依赖项

python = "^3.9"
nonebot2 = "^2.3.0"
nonebot-adapter-onebot = "^2.1.0"

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_mmm-0.2.2.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_mmm-0.2.2-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_mmm-0.2.2.tar.gz.

File metadata

  • Download URL: nonebot_plugin_mmm-0.2.2.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_mmm-0.2.2.tar.gz
Algorithm Hash digest
SHA256 e2e79fe9402cb5cb80e8bf6373bc38bd8d17d2217a826b334f2f93c0742b55c6
MD5 aba5c433f6fef846ecef73652ae186da
BLAKE2b-256 d28c3cd7a02bcc5a852ad47b61ee989ede5ec5204257087098b707068237a660

See more details on using hashes here.

File details

Details for the file nonebot_plugin_mmm-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: nonebot_plugin_mmm-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 4.7 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_mmm-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 269898489f005b7d1be33381a9e8b356d3d9c800b3afdaa73e2d6f5e9b5105e4
MD5 0af1432cd90ea7c66bec70c4f70d7aef
BLAKE2b-256 f0a3e51d55927d3d52b0b106e21d5023a4d5dea9fb36c0cbf34cb5b8cdfbba79

See more details on using hashes here.

Supported by

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