Skip to main content

自定义群聊戳戳事件 plugin for NoneBot2

Project description

AgnesDigitalLogo

NoneBotPluginText

nonebot_plugin_poke(仅支持onebotv11)

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

GitHub stars GitHub issues QQ Chat Group pypi python NoneBot

注意事项

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

安装

方法一 (推荐):

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: str = '宁宁'
# 是否回复图片
poke_send_pic: bool = False
# 是否回复戳戳
poke_send_poke: bool = True
# 是否回复文字
poke_send_text: bool = False
# 是否回复音频
poke_send_acc: bool = False

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

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

指令

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

数据结构

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

其他

  • 如果发不出语音,请手动安装ffmpeg
  • 当语音,与图或文都为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_poke-0.1.6.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

nonebot_plugin_poke-0.1.6-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_poke-0.1.6.tar.gz.

File metadata

  • Download URL: nonebot_plugin_poke-0.1.6.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.25.4 CPython/3.12.3 Linux/6.11.0-1015-azure

File hashes

Hashes for nonebot_plugin_poke-0.1.6.tar.gz
Algorithm Hash digest
SHA256 d2af3bc977fb77bbbc120990df1192fa9a53acae7439f50d47b0fb4c8859d14a
MD5 7946bf88ab72b34a1a06fe71aba82083
BLAKE2b-256 697bca3439a056fe6f29a141253cad9783666d3a7b77ba69db184fb159919050

See more details on using hashes here.

File details

Details for the file nonebot_plugin_poke-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: nonebot_plugin_poke-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.25.4 CPython/3.12.3 Linux/6.11.0-1015-azure

File hashes

Hashes for nonebot_plugin_poke-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 aa9a1cbddf5d469d82a80bd5ae5070a7ef73aa3d8a956d056c0d4bc2fda3de20
MD5 dff66fc2a2558c8c3c67956e6174adea
BLAKE2b-256 7124d211231e29dcbbc9cc8c04e70b8a73311452199a4b51e809c3523654a94c

See more details on using hashes here.

Supported by

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