Skip to main content

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

Project description

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 的时候,则随机发送一种,防止刷屏刷到风控

参考

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.2.2.tar.gz (7.0 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_poke-0.2.2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nonebot_plugin_poke-0.2.2.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.26.6 CPython/3.12.3 Linux/6.14.0-1017-azure

File hashes

Hashes for nonebot_plugin_poke-0.2.2.tar.gz
Algorithm Hash digest
SHA256 78cf9a37d1980f177ddff7d33fa8cc62bf547d9e5bdd2fdced643df9a2c1c1b2
MD5 beb8802ca5c97d2f15822d3a35f1af6d
BLAKE2b-256 4b5b9bec2f7fa05ff983c0bb9d3f7e18cee2d7d723499dbf6ddced10d42a5999

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nonebot_plugin_poke-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.26.6 CPython/3.12.3 Linux/6.14.0-1017-azure

File hashes

Hashes for nonebot_plugin_poke-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 130c67ce2ee50aa59d3bb88bb7d2a846b89392c519c2b65fc9d06ced6df75f19
MD5 f09b08305fdfaffebb21fa2a27c1571b
BLAKE2b-256 9862c85b07faa549ffc05cef7a11f7166e44be6fc435252b1e78f0354185ef6e

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