Merge branch 'main' into dev
This commit is contained in:
20
License
Normal file
20
License
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# Plugin License (私有授权声明)
|
||||||
|
Copyright (c) 2026 Fairy Oracle Sanctuary Development Group (插件专属版权归属)
|
||||||
|
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
## 授权规则
|
||||||
|
1. 本插件为闭源私有软件,仅授权获得我方书面许可的个人/实体使用;
|
||||||
|
2. 未经许可,任何方不得复制、修改、分发、销售本插件的源代码/二进制文件,不得将插件用于任何商业/非商业用途;
|
||||||
|
3. 禁止对插件进行逆向工程、反编译、反汇编等破解行为。
|
||||||
|
|
||||||
|
## 框架与插件的关系说明
|
||||||
|
- 本插件基于我方(Fairy Oracle Sanctuary Development Group)开发的 MIT 协议框架构建;
|
||||||
|
- 框架以 MIT 协议开源(可自由使用/修改/分发),但插件为框架专属配套闭源模块,其授权规则独立于框架;
|
||||||
|
- 框架的 MIT 协议不覆盖插件,插件的使用需单独获得我方授权。
|
||||||
|
|
||||||
|
## 免责声明
|
||||||
|
本插件按“原样”提供,我方不对插件的稳定性、兼容性、安全性承担任何担保责任;因使用插件导致的任何损失,我方不承担法律责任。
|
||||||
|
|
||||||
|
## 授权申请
|
||||||
|
如需获取插件使用授权(商用/非商用),请联系我们
|
||||||
122
base_plugins/jrcd.py
Normal file
122
base_plugins/jrcd.py
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
import random
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
|
from core.bot import Bot
|
||||||
|
from core.command_manager import matcher
|
||||||
|
from models import MessageEvent, MessageSegment
|
||||||
|
|
||||||
|
# jrcd
|
||||||
|
JRCDMSG_1 = [
|
||||||
|
"今天的长度是%scm,可以让我一口吃掉吗罒ω罒",
|
||||||
|
"今天的长度是%scm,啥啊?怎么这么小啊?(*°ー°)v",
|
||||||
|
"今天的长度是%scm,什么嘛,原来是可爱的小豆丁呀(*°ー°)v",
|
||||||
|
]
|
||||||
|
JRCDMSG_2 = [
|
||||||
|
"今天的长度是%scm,还行,也不是不能接受(๑´ㅂ´๑)",
|
||||||
|
"今天的长度是%scm,小老弟不错啊,和哥哥一起玩会儿吗(〃∇〃)",
|
||||||
|
"今天的长度是%scm,也许我们今晚能做很多很多事情呢(〃∇〃)",
|
||||||
|
]
|
||||||
|
JRCDMSG_3 = [
|
||||||
|
"今天的长度是%scm,哦豁?听说你很勇哦?(✧◡✧)",
|
||||||
|
"今天的长度是%scm,嘶哈嘶哈(((o(*°▽°*)o)))...",
|
||||||
|
"今天的长度是%scm,我靠,让哥哥爽一爽吧!(((o(*°▽°*)o)))...",
|
||||||
|
"今天的长度是%scm,单是看到哥哥的长度就....(〃w〃)",
|
||||||
|
]
|
||||||
|
|
||||||
|
# bbcd short
|
||||||
|
BBCDMSG1 = ["还行,可以尝试一下(๑‾ ꇴ ‾๑)"]
|
||||||
|
BBCDMSG2 = ["差的不多,富贵险中求一下(*°ー°)v?"]
|
||||||
|
BBCDMSG3 = ["快逃!!!!!!!!(o(*°▽°*)o)"]
|
||||||
|
|
||||||
|
# bbcd long
|
||||||
|
BBCDMSG4 = ["差的不多,富贵险中求一下(*°ー°)v?", "还行,可以尝试一下(๑‾ ꇴ ‾๑)"]
|
||||||
|
BBCDMSG5 = ["不错的成绩,努力一下或许可以让他受孕哦..(〃w〃)"]
|
||||||
|
BBCDMSG6 = ["好猛,试试强制让他受孕吧!!!(((o(*°▽°*)o)))"]
|
||||||
|
|
||||||
|
# bbcd equal
|
||||||
|
BBCDMSG7 = ["试试刺刀看看谁能赢吧!"]
|
||||||
|
|
||||||
|
|
||||||
|
def get_jrcd(user_id: int) -> int:
|
||||||
|
current_time = (
|
||||||
|
datetime.now().year * 100 + datetime.now().month * 100 + datetime.now().day
|
||||||
|
)
|
||||||
|
|
||||||
|
random.seed(hash(user_id + current_time))
|
||||||
|
jrcd = random.randint(1, 30)
|
||||||
|
random.seed()
|
||||||
|
|
||||||
|
return jrcd
|
||||||
|
|
||||||
|
|
||||||
|
@matcher.command("jrcd")
|
||||||
|
async def handle_jrcd(bot: Bot, event: MessageEvent, args: list[str]):
|
||||||
|
"""
|
||||||
|
处理 jrcd 指令,来看看你的长度吧!
|
||||||
|
|
||||||
|
:param bot: Bot 实例
|
||||||
|
:param event: 消息事件对象
|
||||||
|
:param args: 指令参数列表
|
||||||
|
"""
|
||||||
|
user_id = event.user_id
|
||||||
|
jrcd = get_jrcd(user_id)
|
||||||
|
msg = [MessageSegment.at(user_id)]
|
||||||
|
if jrcd <= 9:
|
||||||
|
msg.append(MessageSegment.text(random.choice(JRCDMSG_1) % jrcd))
|
||||||
|
elif jrcd <= 19:
|
||||||
|
msg.append(MessageSegment.text(random.choice(JRCDMSG_2) % jrcd))
|
||||||
|
else:
|
||||||
|
msg.append(MessageSegment.text(random.choice(JRCDMSG_3) % jrcd))
|
||||||
|
await event.reply(msg)
|
||||||
|
|
||||||
|
|
||||||
|
@matcher.command("bbcd")
|
||||||
|
async def handle_bbcd(bot: Bot, event: MessageEvent, args: list[str]):
|
||||||
|
"""
|
||||||
|
处理 bbcd 指令,和别人比比长度吧!
|
||||||
|
|
||||||
|
:param bot: Bot 实例
|
||||||
|
:param event: 消息事件对象
|
||||||
|
:param args: 指令参数列表
|
||||||
|
"""
|
||||||
|
message = event.message
|
||||||
|
print(message)
|
||||||
|
if len(message) < 2:
|
||||||
|
return
|
||||||
|
user_id1 = event.user_id
|
||||||
|
user_id2 = int(message[1].data.get("qq", 0))
|
||||||
|
if user_id1 == user_id2:
|
||||||
|
await event.reply("不能和自己比!")
|
||||||
|
return
|
||||||
|
|
||||||
|
jrcd1 = get_jrcd(user_id1)
|
||||||
|
jrcd2 = get_jrcd(user_id2)
|
||||||
|
|
||||||
|
jrcz = jrcd1 - jrcd2
|
||||||
|
|
||||||
|
msg = [
|
||||||
|
MessageSegment.at(user_id1),
|
||||||
|
MessageSegment.text("你的长度比"),
|
||||||
|
MessageSegment.at(user_id2),
|
||||||
|
]
|
||||||
|
|
||||||
|
if jrcz == 0:
|
||||||
|
msg.append(MessageSegment.text("一样长。"))
|
||||||
|
msg.append(MessageSegment.text(random.choice(BBCDMSG7)))
|
||||||
|
elif jrcz > 0:
|
||||||
|
msg.append(MessageSegment.text("长" + str(jrcz) + "cm。"))
|
||||||
|
if jrcz <= 9:
|
||||||
|
msg.append(MessageSegment.text(random.choice(BBCDMSG1)))
|
||||||
|
elif jrcz <= 19:
|
||||||
|
msg.append(MessageSegment.text(random.choice(BBCDMSG2)))
|
||||||
|
else:
|
||||||
|
msg.append(MessageSegment.text(random.choice(BBCDMSG3)))
|
||||||
|
elif jrcz < 0:
|
||||||
|
msg.append(MessageSegment.text("短" + str(abs(jrcz)) + "cm。"))
|
||||||
|
if jrcz >= -9:
|
||||||
|
msg.append(MessageSegment.text(random.choice(BBCDMSG4)))
|
||||||
|
elif jrcz >= -19:
|
||||||
|
msg.append(MessageSegment.text(random.choice(BBCDMSG5)))
|
||||||
|
else:
|
||||||
|
msg.append(MessageSegment.text(random.choice(BBCDMSG6)))
|
||||||
|
await event.reply(msg)
|
||||||
15
base_plugins/thpic.py
Normal file
15
base_plugins/thpic.py
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
"""
|
||||||
|
thpic 插件
|
||||||
|
|
||||||
|
提供 /thpic 指令,用于随机返回一个东方Project的图片。
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
from core.bot import Bot
|
||||||
|
from core.command_manager import matcher
|
||||||
|
from models import MessageEvent, MessageSegment
|
||||||
|
|
||||||
|
|
||||||
|
@matcher.command("thpic")
|
||||||
|
async def handle_echo(bot: Bot, event: MessageEvent, args: list[str]):
|
||||||
|
await event.reply(MessageSegment.image("https://img.paulzzh.com/touhou/random"))
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
from .message import MessageSegment
|
|
||||||
from .sender import Sender
|
|
||||||
from .events.base import OneBotEvent
|
from .events.base import OneBotEvent
|
||||||
from .events.message import MessageEvent, PrivateMessageEvent, GroupMessageEvent
|
from .events.message import MessageEvent, PrivateMessageEvent, GroupMessageEvent
|
||||||
from .events.notice import (
|
from .events.notice import (
|
||||||
|
|||||||
Reference in New Issue
Block a user