自定义群聊戳戳事件 plugin for NoneBot2
Project description
安装
方法一:
nb plugin install 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for nonebot_plugin_poke-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b2da5ae1223d8cb17e48b9ceb9d3b815af8f7711752b785c616f96fbc718488 |
|
MD5 | 62c67b6e1fb06060e9e1ba9a94ffda43 |
|
BLAKE2b-256 | 3ec478a24277ace4f7f13306426c4c193c1b7a7e14927060d4d47a396643b1dc |
Close
Hashes for nonebot_plugin_poke-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4c492497aa682379f2a2b7063c93a970f0ca30c1b0ffdebfe3b1952eac921e7 |
|
MD5 | 383a2fabc160d7ce43526db2db5b00bd |
|
BLAKE2b-256 | 941329098ea1cd268d9508756e3bd7890058002f39904dd3c207585be3d8e035 |