mirror of
https://github.com/LiteyukiStudio/nonebot-plugin-marshoai.git
synced 2025-02-25 12:19:23 +08:00
修复了MegaKits插件上次PR存在的问题 (#19)
* modified: pyproject.toml nonebot_plugin_marshoai/tools/marshoai-megakits/ * modified: nonebot_plugin_marshoai/models.py new file: nonebot_plugin_marshoai/tools/marshoai-megakits/a.py nonebot_plugin_marshoai/tools/marshoai-megakits/__init__.py nonebot_plugin_marshoai/tools/marshoai-megakits/tools.json * modified: nonebot_plugin_marshoai/models.py nonebot_plugin_marshoai/tools/marshoai-megakits/__init__.py nonebot_plugin_marshoai/tools/marshoai-megakits/tools.json * deleted: nonebot_plugin_marshoai/tools/marshoai-megakits/a.py new file: nonebot_plugin_marshoai/tools/marshoai-megakits/mk_Common.py new file: nonebot_plugin_marshoai/tools/marshoai-megakits/mk_Info.py new file: nonebot_plugin_marshoai/tools/marshoai-megakits/mk_MorseCode.py new file: nonebot_plugin_marshoai/tools/marshoai-megakits/mk_NyaCode.py nonebot_plugin_marshoai/tools/marshoai-megakits/__init__.py nonebot_plugin_marshoai/tools/marshoai-megakits/tools.json * modified: nonebot_plugin_marshoai/models.py modified: nonebot_plugin_marshoai/tools/marshoai-megakits/mk_Info.py modified: nonebot_plugin_marshoai/util.py modified: pyproject.toml nonebot_plugin_marshoai/tools/marshoai-megakits/__init__.py nonebot_plugin_marshoai/tools/marshoai-megakits/tools.json * modified: nonebot_plugin_marshoai/models.py modified: nonebot_plugin_marshoai/tools/marshoai-megakits/mk_Info.py modified: nonebot_plugin_marshoai/util.py modified: pyproject.toml nonebot_plugin_marshoai/tools/marshoai-megakits/__init__.py nonebot_plugin_marshoai/tools/marshoai-megakits/tools.json
This commit is contained in:
parent
5c51797e00
commit
897470ba15
nonebot_plugin_marshoai/tools/marshoai-megakits
37
nonebot_plugin_marshoai/tools/marshoai-megakits/__init__.py
Normal file
37
nonebot_plugin_marshoai/tools/marshoai-megakits/__init__.py
Normal file
@ -0,0 +1,37 @@
|
||||
|
||||
from . import mk_Info
|
||||
from . import mk_Common
|
||||
from . import mk_MorseCode
|
||||
from . import mk_NyaCode
|
||||
|
||||
# Twisuki
|
||||
async def twisuki():
|
||||
return str(mk_Info.twisuki())
|
||||
|
||||
# MegaKits
|
||||
async def megakits():
|
||||
return str(mk_Info.megakits())
|
||||
|
||||
# Random Turntable
|
||||
async def random_turntable(upper: int, lower: int = "0"):
|
||||
return str(mk_Common.random_turntable(upper, lower))
|
||||
|
||||
# Number Calc
|
||||
async def number_calc(a: str, b: str, op: str):
|
||||
return str(mk_Common.number_calc(a, b, op))
|
||||
|
||||
# MorseCode Encrypt
|
||||
async def morse_encrypt(msg: str):
|
||||
return str(mk_MorseCode.morse_encrypt(msg))
|
||||
|
||||
# MorseCode Decrypt
|
||||
async def morse_decrypt(msg: str):
|
||||
return str(mk_MorseCode.morse_decrypt(msg))
|
||||
|
||||
# NyaCode Encrypt
|
||||
async def nya_encode(msg: str):
|
||||
return str(mk_NyaCode.nya_encode(msg))
|
||||
|
||||
# NyaCode Decrypt
|
||||
async def nya_decode(msg: str):
|
||||
return str(mk_NyaCode.nya_decode(msg))
|
142
nonebot_plugin_marshoai/tools/marshoai-megakits/tools.json
Normal file
142
nonebot_plugin_marshoai/tools/marshoai-megakits/tools.json
Normal file
@ -0,0 +1,142 @@
|
||||
[
|
||||
{
|
||||
"type" : "function",
|
||||
"function" : {
|
||||
"name" : "marshoai-megakits__twisuki",
|
||||
"description" : "介绍插件作者Twisuki(苏阳)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type" : "function",
|
||||
"function" : {
|
||||
"name" : "marshoai-megakits__megakits",
|
||||
"description" : "介绍本插件MegaKits"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type" : "function",
|
||||
"function" : {
|
||||
"name" : "marshoai-megakits__random_turntable",
|
||||
"description" : "随机转盘, 玩家输入上下限(均为整数), 返回一个随机整数",
|
||||
"parameters" : {
|
||||
"type" : "object",
|
||||
"properties" : {
|
||||
"upper" : {
|
||||
"type" : "integer",
|
||||
"description" : "随机数上限"
|
||||
},
|
||||
"lower" : {
|
||||
"type" : "integer",
|
||||
"description" : "随机数下限"
|
||||
}
|
||||
}
|
||||
},
|
||||
"require" : [
|
||||
"upper"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type" : "function",
|
||||
"function" : {
|
||||
"name" : "marshoai-megakits__number_calc",
|
||||
"description" : "数字计算器, 可对整数 小数做加减乘除, 乘方 取余运算",
|
||||
"parameters" : {
|
||||
"type" : "object",
|
||||
"properties" : {
|
||||
"a" : {
|
||||
"type" : "string",
|
||||
"description" : "第一个运算数"
|
||||
},
|
||||
"b" : {
|
||||
"type" : "string",
|
||||
"description" : "第二个运算数"
|
||||
},
|
||||
"op" : {
|
||||
"type" : "string",
|
||||
"description" : "运算符, 目前仅支持 + - * / %(取余) **(乘方)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"require" : [
|
||||
"a", "b", "op"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type" : "function",
|
||||
"function" : {
|
||||
"name" : "marshoai-megakits__morse_encrypt",
|
||||
"description" : "摩尔斯电码加密, 输入一个字符串, 返回由.- 组成的摩尔斯电码",
|
||||
"parameters" : {
|
||||
"type" : "object",
|
||||
"properties" : {
|
||||
"msg" : {
|
||||
"type" : "string",
|
||||
"description" : "录入的字符串(包含字母, 数字, 部分标点符号(.:,;?='/!-_\"()$&@))"
|
||||
}
|
||||
},
|
||||
"require" : [
|
||||
"msg"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type" : "function",
|
||||
"function" : {
|
||||
"name" : "marshoai-megakits__morse_decrypt",
|
||||
"description" : "摩尔斯电码解码, 输入一个字符串(由.- 组成), 返回由解码",
|
||||
"parameters" : {
|
||||
"type" : "object",
|
||||
"properties" : {
|
||||
"msg" : {
|
||||
"type" : "string",
|
||||
"description" : "录入的字符串(.- )"
|
||||
}
|
||||
},
|
||||
"require" : [
|
||||
"msg"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type" : "function",
|
||||
"function" : {
|
||||
"name" : "marshoai-megakits__nya_encode",
|
||||
"description" : "转换为猫猫语",
|
||||
"parameters" : {
|
||||
"type" : "object",
|
||||
"properties" : {
|
||||
"msg" : {
|
||||
"type" : "string",
|
||||
"description" : "待转换的字符串"
|
||||
}
|
||||
},
|
||||
"require" : [
|
||||
"msg"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"function": {
|
||||
"name": "marshoai-megakits__nya_decode",
|
||||
"description": "翻译猫语",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"msg": {
|
||||
"type": "string",
|
||||
"description": "录入的猫语"
|
||||
}
|
||||
},
|
||||
"require": [
|
||||
"msg"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
Loading…
x
Reference in New Issue
Block a user