Skip to content

Commit

Permalink
添加一些插件的metadata.json
Browse files Browse the repository at this point in the history
  • Loading branch information
SAGIRI-kawaii committed Aug 18, 2022
1 parent 3fdaa8e commit 2c829e5
Show file tree
Hide file tree
Showing 10 changed files with 95 additions and 5 deletions.
1 change: 0 additions & 1 deletion sagiri_bot/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ async def limit(event: GroupMessage) -> NoReturn:
return
frequency_limit_instance = create(GlobalFrequencyLimitDict)
frequency_limit_instance.add_record(group, member, weight)
print(frequency_limit_instance.frequency_limit_dict)
if frequency_limit_instance.blacklist_judge(group, member):
if not frequency_limit_instance.announce_judge(group, member):
frequency_limit_instance.blacklist_announced(group, member)
Expand Down
13 changes: 13 additions & 0 deletions sagiri_bot/handler/required_module/bot_management/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "BotManagement",
"version": "0.1",
"display_name": "BOT管理模块",
"authors": [
"SAGIRI-kawaii"
],
"description": "一个可以管理BOT的插件",
"usage": "发送 setting -set key1=value1 key2=value2 ... 改变群内设置\n发送 user -grant @target [1-3] 改变成员权限等级\n发送 blacklist -add @target 添加群内黑名单\n发送 blacklist -remove @target 移除群内黑名单",
"icon": "",
"prefix": [],
"triggers": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "ChatRecorder",
"version": "0.1",
"display_name": "群聊记录存储",
"authors": [
"SAGIRI-kawaii"
],
"description": "一个对聊天记录进行存储的插件,可配合词云等插件使用",
"usage": "自动触发",
"icon": "",
"prefix": [],
"triggers": []
}
13 changes: 13 additions & 0 deletions sagiri_bot/handler/required_module/exception_catcher/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "ExceptionCatcher",
"version": "0.1",
"display_name": "错误报告",
"authors": [
"SAGIRI-kawaii"
],
"description": "一个向主人报告错误的插件",
"usage": "后台发生错误时自动触发",
"icon": "",
"prefix": [],
"triggers": []
}
2 changes: 1 addition & 1 deletion sagiri_bot/handler/required_module/helper/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"usage": "发送 `/help` 即可查看所有插件",
"icon": "",
"prefix": ["/", ".", "#", ""],
"triggers": ["help", "帮助", "菜单", "功能"]
"triggers": ["help", "帮助", "菜单", "功能", "纱雾帮助"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

from sagiri_bot.orm.async_orm import orm
from sagiri_bot.orm.async_orm import ChatRecord
from sagiri_bot.internal_utils import get_command
from sagiri_bot.control import (
FrequencyLimit,
Function,
Expand All @@ -46,9 +47,8 @@
inline_dispatchers=[
Twilight(
[
FullMatch("消息量统计"),
ArgumentMatch("-group", action="store_true", optional=True)
@ "group_only",
get_command(__file__, channel.module),
ArgumentMatch("-group", action="store_true", optional=True) @ "group_only",
]
)
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "MessageStatics",
"version": "0.1",
"display_name": "消息量统计",
"authors": [
"SAGIRI-kawaii"
],
"description": "一个对不同事件进行处理的插件",
"usage": "在群中发送 `消息量统计` 即可\n发送 `消息量统计 -group` 可查看本群统计",
"icon": "",
"prefix": ["", "/"],
"triggers": ["消息量统计"]
}
13 changes: 13 additions & 0 deletions sagiri_bot/handler/required_module/mirai_event/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "MiraiEvent",
"version": "0.1",
"display_name": "事件处理",
"authors": [
"SAGIRI-kawaii"
],
"description": "一个对不同事件进行处理的插件",
"usage": "自动触发",
"icon": "",
"prefix": [],
"triggers": []
}
13 changes: 13 additions & 0 deletions sagiri_bot/handler/required_module/saya_manager/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "SayaManager",
"version": "0.1",
"display_name": "插件管理",
"authors": [
"SAGIRI-kawaii"
],
"description": "一个可以管理saya模块的插件",
"usage": "发送 `已加载插件` 查看已加载插件\n发送 `插件详情 [编号|名称]` 可查看插件详情\n发送 `[加载|重载|卸载|打开|关闭]插件 [编号|名称]` 可加载/重载/卸载/打开/关闭插件",
"icon": "",
"prefix": [],
"triggers": []
}
13 changes: 13 additions & 0 deletions sagiri_bot/handler/required_module/system_status/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "SystemStatus",
"version": "0.1",
"display_name": "系统状态",
"authors": [
"SAGIRI-kawaii"
],
"description": "一个可以查看系统状态的插件",
"usage": "发送 /sys 或 '/sys -a' 或 '/sys -all' 查看CPU、内存以及图库占用信息\n发送 /sys -i 或 '/sys -info' 查看CPU、内存信息\n发送 /sys -s 或 '/sys -storage' 查看图库占用信息",
"icon": "",
"prefix": ["/"],
"triggers": ["sys", "system"]
}

0 comments on commit 2c829e5

Please # to comment.