mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2024-10-21 16:27:15 +08:00
✨ 新增入群欢迎
和远程处理好友、群请求
,更新README
This commit is contained in:
parent
fec8beba1d
commit
9a330c99fc
@ -18,7 +18,9 @@ hidden_plugins = [
|
||||
'nonebot_plugin_imageutils',
|
||||
'plugin_manager',
|
||||
'database_manager',
|
||||
'admin'
|
||||
'admin',
|
||||
'NoticeAndRequest',
|
||||
'bot_manager'
|
||||
]
|
||||
|
||||
|
||||
|
@ -148,10 +148,12 @@ async def _(bot: Bot, event: GroupIncreaseNoticeEvent):
|
||||
async def _(event: MessageEvent, regex_dict: dict = RegexDict()):
|
||||
type = regex_dict['type']
|
||||
target = regex_dict['target'].split(' ')
|
||||
if not target:
|
||||
target = [str(event.group_id)]
|
||||
if any(i in target for i in {'全部', 'all', '所有'}):
|
||||
target = ['全部']
|
||||
else:
|
||||
target = list(map(int, target))
|
||||
if not target:
|
||||
target = [event.group_id]
|
||||
for t in target:
|
||||
if not t.isdigit() and t != '全部':
|
||||
await ban_greet.finish('请输入要禁用|启用群欢迎的正确的群号')
|
||||
@ -159,9 +161,9 @@ async def _(event: MessageEvent, regex_dict: dict = RegexDict()):
|
||||
config.group_ban = ['全部'] if type in {'禁用', '关闭'} else []
|
||||
elif type in {'禁用', '关闭'}:
|
||||
if t not in config.group_ban:
|
||||
config.group_ban.append(int(t))
|
||||
config.group_ban.append(t)
|
||||
elif t in config.group_ban:
|
||||
config.group_ban.remove(int(t))
|
||||
config.group_ban.remove(t)
|
||||
config.save()
|
||||
await ban_greet.finish(f'已{type}群{" ".join(target)}的群欢迎')
|
||||
|
||||
|
@ -369,7 +369,7 @@ def format_message(text: str, **kwargs) -> Message:
|
||||
for text in texts:
|
||||
if text == '{nickname}':
|
||||
msg += MessageSegment.text(NICKNAME)
|
||||
elif text in '{at_user}':
|
||||
elif text == '{at_user}':
|
||||
msg += MessageSegment.at(kwargs['user_id']) if 'user_id' in kwargs else MessageSegment.text('{at_user}')
|
||||
elif text.startswith(('{img', '{voice', '{video')):
|
||||
url = text.split(':', 1)[1].strip('}')
|
||||
|
56
README.md
56
README.md
@ -7,7 +7,7 @@
|
||||
<p align="center">
|
||||
<a href="https://cdn.jsdelivr.net/gh/CMHopeSunshine/LittlePaimon@master/LICENSE"><img src="https://img.shields.io/github/license/CMHopeSunshine/LittlePaimon" alt="license"></a>
|
||||
<img src="https://img.shields.io/badge/Python-3.8+-yellow" alt="python">
|
||||
<img src="https://img.shields.io/badge/Nonebot-2.0.0b4-green" alt="python">
|
||||
<img src="https://img.shields.io/badge/Version-3.0.0beta4-green" alt="version">
|
||||
<a href="https://qun.qq.com/qqweb/qunpro/share?_wv=3&_wwv=128&inviteCode=MmWrI&from=246610&biz=ka"><img src="https://img.shields.io/badge/QQ频道交流-尘世闲游-blue?style=flat-square" alt="QQ guild"></a>
|
||||
</p>
|
||||
|
||||
@ -15,22 +15,56 @@
|
||||
|
||||
原神多功能机器人,通过米游社接口查询uid的游戏信息,并提供WIKI查询和各种各样的好玩的功能。
|
||||
|
||||
该分支正在积极**开发中**,核心功能基本完成,欢迎帮助测试!
|
||||
该分支正在积极**开发中**,尚未发布正式版本,欢迎帮助测试和提出宝贵意见!
|
||||
|
||||
## | 新特性
|
||||
> 相较于主分支而言
|
||||
- 1、全新风格UI,好看!
|
||||
- 2、代码结构更优美,更高性能!
|
||||
- 3、集成插件权限管理器、自动帮助图生成
|
||||
- 4、可用Web UI添加私人Cookie
|
||||
- 5、须弥支持!
|
||||
## | 功能示例
|
||||
<details>
|
||||
<summary>帮助列表</summary>
|
||||
<img src="https://static.cherishmoon.fun/LittlePaimon/readme/new/help.jpg" alt="help">
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>玩家卡片</summary>
|
||||
<img src="https://static.cherishmoon.fun/LittlePaimon/readme/new/ys.jpg" alt="ys">
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>角色背包</summary>
|
||||
<img src="https://static.cherishmoon.fun/LittlePaimon/readme/new/ysa.jpg" alt="ysa">
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>角色面板</summary>
|
||||
<img src="https://static.cherishmoon.fun/LittlePaimon/readme/new/ysd.jpg" alt="ysd">
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>角色卡片</summary>
|
||||
<img src="https://static.cherishmoon.fun/LittlePaimon/readme/new/ysc.jpg" alt="ysc">
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>深渊战报</summary>
|
||||
<img src="https://static.cherishmoon.fun/LittlePaimon/readme/new/sy.jpg" alt="sy">
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>实时便签</summary>
|
||||
<img src="https://static.cherishmoon.fun/LittlePaimon/readme/ssbq.jpg" alt="ssbq">
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>每月札记</summary>
|
||||
<img src="https://static.cherishmoon.fun/LittlePaimon/readme/myzj.jpg" alt="myzj">
|
||||
</details>
|
||||
## 丨安装方法
|
||||
|
||||
> 详细教程可看[博客链接](https://blog.cherishmoon.fun/posts/nonebot2deploy.html)
|
||||
|
||||
- 1、安装poetry`pip install poetry`
|
||||
- 2、克隆本分支`git clone https://github.com/CMHopeSunshine/LittlePaimon -b Bot --depth=1`
|
||||
- 2、克隆本分支`git clone https://github.com/CMHopeSunshine/LittlePaimon --depth=1`
|
||||
- 3、进入目录并安装依赖`poetry install`
|
||||
- 4、安装配置go-cqhttp`略`
|
||||
- 4、安装配置go-cqhttp或插件版`略`
|
||||
- 5、启动`poetry run nb run`
|
||||
- 6、添加公共ck`添加公共ck`
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user