mirror of
https://github.com/TriM-Organization/LiteyukiBot-TriM.git
synced 2024-11-28 16:24:51 +08:00
🐛 api命令字符串错误输出
This commit is contained in:
parent
a6408a3397
commit
bfb5cf2cf0
@ -2,7 +2,6 @@ from nonebot.plugin import PluginMetadata
|
|||||||
|
|
||||||
from .core import *
|
from .core import *
|
||||||
from .loader import *
|
from .loader import *
|
||||||
from .runtime import *
|
|
||||||
from .dev_tools import *
|
from .dev_tools import *
|
||||||
|
|
||||||
__author__ = "snowykami"
|
__author__ = "snowykami"
|
||||||
@ -17,6 +16,8 @@ __plugin_meta__ = PluginMetadata(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
from ..utils.base.language import Language, get_default_lang_code
|
||||||
|
|
||||||
print("\033[34m" + r"""
|
print("\033[34m" + r"""
|
||||||
__ ______ ________ ________ __ __ __ __ __ __ ______
|
__ ______ ________ ________ __ __ __ __ __ __ ______
|
||||||
/ | / |/ |/ |/ \ / |/ | / |/ | / |/ |
|
/ | / |/ |/ |/ \ / |/ | / |/ | / |/ |
|
||||||
@ -31,4 +32,4 @@ $$$$$$$$/ $$$$$$/ $$/ $$$$$$$$/ $$/ $$$$$$/ $$/ $$/ $$$$$$/
|
|||||||
|
|
||||||
sys_lang = Language(get_default_lang_code())
|
sys_lang = Language(get_default_lang_code())
|
||||||
nonebot.logger.info(sys_lang.get("main.current_language", LANG=sys_lang.get("language.name")))
|
nonebot.logger.info(sys_lang.get("main.current_language", LANG=sys_lang.get("language.name")))
|
||||||
nonebot.logger.info(sys_lang.get("main.enable_webdash", URL=f"http://127.0.0.1:{config.get('port', 20216)}"))
|
# nonebot.logger.info(sys_lang.get("main.enable_webdash", URL=f"http://127.0.0.1:{config.get('port', 20216)}"))
|
||||||
|
@ -31,11 +31,15 @@ markdown_image = common_db.first(StoredConfig(), default=StoredConfig()).config.
|
|||||||
@on_alconna(
|
@on_alconna(
|
||||||
command=Alconna(
|
command=Alconna(
|
||||||
"liteecho",
|
"liteecho",
|
||||||
|
Args["text", str],
|
||||||
),
|
),
|
||||||
permission=SUPERUSER
|
permission=SUPERUSER
|
||||||
).handle()
|
).handle()
|
||||||
async def _(bot: T_Bot, matcher: Matcher):
|
async def _(bot: T_Bot, matcher: Matcher, result: Arparma):
|
||||||
await matcher.finish(f"Hello, Liteyuki!\nBot {bot.self_id}")
|
if result.main_args.get("text"):
|
||||||
|
await matcher.finish(Message(unescape(result.main_args.get("text"))))
|
||||||
|
else:
|
||||||
|
await matcher.finish(f"Hello, Liteyuki!\nBot {bot.self_id}")
|
||||||
|
|
||||||
|
|
||||||
@on_alconna(
|
@on_alconna(
|
||||||
|
Loading…
Reference in New Issue
Block a user