From 8b0d5de95489b2af41100ae5969ba48bec5eaa1f Mon Sep 17 00:00:00 2001 From: baby20162016 <2185823427@qq.com> Date: Fri, 2 Jan 2026 15:48:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4base=5Fplugins=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=A4=B9=EF=BC=8C=E8=BF=81=E7=A7=BB=E5=88=B0plugins?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=A4=B9=E4=B8=8B=EF=BC=8C=E6=9B=B4=E6=94=B9?= =?UTF-8?q?models=E4=B8=AD=E7=9A=84init=E6=96=87=E4=BB=B6=E5=92=8Cmessage?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- License | 33 +++++++++--------- models/__init__.py | 55 ++++++++++++++++++++++-------- models/message.py | 3 +- {base_plugins => plugins}/jrcd.py | 22 +++++++----- {base_plugins => plugins}/thpic.py | 6 ++++ 5 files changed, 80 insertions(+), 39 deletions(-) rename {base_plugins => plugins}/jrcd.py (89%) rename {base_plugins => plugins}/thpic.py (75%) diff --git a/License b/License index 5300149..75d6d78 100644 --- a/License +++ b/License @@ -1,20 +1,21 @@ -# Plugin License (私有授权声明) -Copyright (c) 2026 Fairy Oracle Sanctuary Development Group (插件专属版权归属) +MIT License -All Rights Reserved. +Copyright (c) 2026 Fairy Oracle Sanctuary Development Group -## 授权规则 -1. 本插件为闭源私有软件,仅授权获得我方书面许可的个人/实体使用; -2. 未经许可,任何方不得复制、修改、分发、销售本插件的源代码/二进制文件,不得将插件用于任何商业/非商业用途; -3. 禁止对插件进行逆向工程、反编译、反汇编等破解行为。 +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -## 框架与插件的关系说明 -- 本插件基于我方(Fairy Oracle Sanctuary Development Group)开发的 MIT 协议框架构建; -- 框架以 MIT 协议开源(可自由使用/修改/分发),但插件为框架专属配套闭源模块,其授权规则独立于框架; -- 框架的 MIT 协议不覆盖插件,插件的使用需单独获得我方授权。 +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -## 免责声明 -本插件按“原样”提供,我方不对插件的稳定性、兼容性、安全性承担任何担保责任;因使用插件导致的任何损失,我方不承担法律责任。 - -## 授权申请 -如需获取插件使用授权(商用/非商用),请联系我们 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/models/__init__.py b/models/__init__.py index 7103dd1..3541531 100644 --- a/models/__init__.py +++ b/models/__init__.py @@ -1,20 +1,47 @@ from .events.base import OneBotEvent -from .events.message import MessageEvent, PrivateMessageEvent, GroupMessageEvent -from .events.notice import ( - NoticeEvent, FriendAddNoticeEvent, FriendRecallNoticeEvent, - GroupRecallNoticeEvent, GroupIncreaseNoticeEvent, - GroupDecreaseNoticeEvent, GroupAdminNoticeEvent, GroupBanNoticeEvent, - GroupUploadNoticeEvent, GroupUploadFile, - NotifyNoticeEvent, PokeNotifyEvent, LuckyKingNotifyEvent, HonorNotifyEvent, - GroupCardNoticeEvent, OfflineFileNoticeEvent, OfflineFile, - ClientStatusNoticeEvent, ClientStatus, EssenceNoticeEvent -) -from .events.request import RequestEvent, FriendRequestEvent, GroupRequestEvent -from .events.meta import MetaEvent, HeartbeatEvent, LifeCycleEvent, HeartbeatStatus from .events.factory import EventFactory +from .events.message import ( + GroupMessageEvent, + MessageEvent, + MessageSegment, + PrivateMessageEvent, +) +from .events.meta import HeartbeatEvent, HeartbeatStatus, LifeCycleEvent, MetaEvent +from .events.notice import ( + ClientStatus, + ClientStatusNoticeEvent, + EssenceNoticeEvent, + FriendAddNoticeEvent, + FriendRecallNoticeEvent, + GroupAdminNoticeEvent, + GroupBanNoticeEvent, + GroupCardNoticeEvent, + GroupDecreaseNoticeEvent, + GroupIncreaseNoticeEvent, + GroupRecallNoticeEvent, + GroupUploadFile, + GroupUploadNoticeEvent, + HonorNotifyEvent, + LuckyKingNotifyEvent, + NoticeEvent, + NotifyNoticeEvent, + OfflineFile, + OfflineFileNoticeEvent, + PokeNotifyEvent, +) +from .events.request import FriendRequestEvent, GroupRequestEvent, RequestEvent from .objects import ( - GroupInfo, GroupMemberInfo, FriendInfo, StrangerInfo, LoginInfo, - VersionInfo, Status, EssenceMessage, GroupHonorInfo, CurrentTalkative, HonorInfo + CurrentTalkative, + EssenceMessage, + FriendInfo, + GroupHonorInfo, + GroupInfo, + GroupMemberInfo, + HonorInfo, + LoginInfo, + Status, + StrangerInfo, + VersionInfo, ) # Alias for backward compatibility diff --git a/models/message.py b/models/message.py index 914a149..8669fad 100644 --- a/models/message.py +++ b/models/message.py @@ -3,6 +3,7 @@ 定义了 MessageSegment 类,用于封装 OneBot 11 的消息段。 """ + from dataclasses import dataclass from typing import Any, Dict @@ -56,7 +57,7 @@ class MessageSegment: # --- 快捷构造方法 --- @staticmethod - def text(text: str) -> "MessageSegment": + def text(text: str) -> "MessageSegment": # noqa: F811 """ 构造文本消息段 diff --git a/base_plugins/jrcd.py b/plugins/jrcd.py similarity index 89% rename from base_plugins/jrcd.py rename to plugins/jrcd.py index 2528643..4c9d422 100644 --- a/base_plugins/jrcd.py +++ b/plugins/jrcd.py @@ -5,6 +5,12 @@ from core.bot import Bot from core.command_manager import matcher from models import MessageEvent, MessageSegment +__plugin_meta__ = { + "name": "jrcd", + "description": "来看看你的长度吧!", + "usage": "/jrcd\n/bbcd [@某人]", +} + # jrcd JRCDMSG_1 = [ "今天的长度是%scm,可以让我一口吃掉吗罒ω罒", @@ -23,15 +29,15 @@ JRCDMSG_3 = [ "今天的长度是%scm,单是看到哥哥的长度就....(〃w〃)", ] -# bbcd short -BBCDMSG1 = ["还行,可以尝试一下(๑‾ ꇴ ‾๑)"] -BBCDMSG2 = ["差的不多,富贵险中求一下(*°ー°)v?"] -BBCDMSG3 = ["快逃!!!!!!!!(o(*°▽°*)o)"] - # bbcd long -BBCDMSG4 = ["差的不多,富贵险中求一下(*°ー°)v?", "还行,可以尝试一下(๑‾ ꇴ ‾๑)"] -BBCDMSG5 = ["不错的成绩,努力一下或许可以让他受孕哦..(〃w〃)"] -BBCDMSG6 = ["好猛,试试强制让他受孕吧!!!(((o(*°▽°*)o)))"] +BBCDMSG1 = ["还行,可以尝试一下(๑‾ ꇴ ‾๑)"] +BBCDMSG2 = ["不错的成绩,努力一下或许可以让他受孕哦..(〃w〃)"] +BBCDMSG3 = ["好猛,试试强制让他受孕吧!!!(((o(*°▽°*)o)))"] + +# bbcd short +BBCDMSG4 = ["差的不多,富贵险中求一下(*°ー°)v?"] +BBCDMSG5 = ["还行,可以尝试一下(๑‾ ꇴ ‾๑)"] +BBCDMSG6 = ["快逃!!!!!!!!(o(*°▽°*)o)"] # bbcd equal BBCDMSG7 = ["试试刺刀看看谁能赢吧!"] diff --git a/base_plugins/thpic.py b/plugins/thpic.py similarity index 75% rename from base_plugins/thpic.py rename to plugins/thpic.py index caa752d..1d8c462 100644 --- a/base_plugins/thpic.py +++ b/plugins/thpic.py @@ -5,6 +5,12 @@ thpic 插件 """ +__plugin_meta__ = { + "name": "thpic", + "description": "来看看东方Project的图片吧!", + "usage": "/thpic", +} + from core.bot import Bot from core.command_manager import matcher from models import MessageEvent, MessageSegment