Skip to main content
AgnesDigitalLogo

NoneBotPluginText

nonebot_plugin_poke(仅支持 onebotv11)

✨Nonebot & 自定义戳戳群聊事件 ✨

python pokelogo NoneBot pypi
ruff black GitHub issues

注意事项

如果使用 napcat,请将版本更新到 1.6.6 或者以上,否则这个功能用不了

如果使用非gocq,则暂时无法使用反戳戳的回复

安装

方法一 (推荐):

nb plugin install nonebot_plugin_poke

方法二:

poetry add nonebot_plugin_poke
pdm add nonebot_plugin_poke

方法三:

pip install nonebot_plugin_poke

再手动添加nonebot_plugin_poke到 bot 文件下pyproject.toml文件中

env 配置项:

# 在完全不写的情况下,效果是戳戳后回复文字
# 机器人名称
bot_nickname = '宁宁'
# 是否回复图片
poke_send_pic = False
# 是否回复戳戳 (接口失效)
# poke_send_poke = False
# 是否回复文字
poke_send_text = True
# 是否回复音频
poke_send_acc = False

如果不知道以下配置,默认就可以,只修改上面部分

# poke文件夹位置
poke_path = 'data/poke'
# 是否开启黑名单模式(否则是白名单)
poke_black = True
# 黑名单屏蔽群组
poke_ban_group = []
# 白名单允许群组
poke_allow_group = []
# 戳戳优先级
poke_priority = 1
# 是否阻断其他指令
poke_block = True

指令

群里双击 bot 头像,会依次按照配置文件,逐步检查回复

数据结构

举例:
└── data
    └── poke
        ├── poke.txt        # 回复文字
        ├── pic             # 回复图片
            ├── 1.png
            ├── 2.jpg
            ├── 3.jpeg
            └── ...
        └── acc             # 回复音频
            ├── 1.acc
            ├── 2.mp3
            └── ...
...

其他

  • 如果发不出语音,请手动安装 ffmpeg, deb 类系统请使用sudo apt install ffmpeg,rpm 类系统请使用sudo yum install ffmpeg

  • 当语音,与图或文都为 True 的时候,则随机发送一种,防止刷屏刷到风控

参考

Release files for nonebot_plugin_poke 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nonebot_plugin_poke 0.3.0
File Size Uploaded
nonebot_plugin_poke-0.3.0.tar.gz 8.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nonebot_plugin_poke 0.3.0
File Interpreter ABI Platform
nonebot_plugin_poke-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.6 kB

Release files / nonebot_plugin_poke-0.3.0.tar.gz

Download URL nonebot_plugin_poke-0.3.0.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
14baa8de9a101f492bf6da0df2e4f44d74c93a487d784ae7557ee6f3d3fee55c
BLAKE2b-256 checksum
How to use checksums
9b2951439380c3562a80d9ab9426dd9e614cefa0e7abec9549adf65692a09d66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.26.7 CPython/3.12.3 Linux/6.14.0-1017-azure

Release files / nonebot_plugin_poke-0.3.0-py3-none-any.whl

Download URL nonebot_plugin_poke-0.3.0-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0602b19f4698620d6418010c54bbd89ccdfa534ea55d862e5b287759c2c991ff
BLAKE2b-256 checksum
How to use checksums
0ad940a3a46d217e384c0f424fbe6240f57f67a685cff95e8e57c644a418fca9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.26.7 CPython/3.12.3 Linux/6.14.0-1017-azure

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.0

2 release files

0.1.6

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page