mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2025-04-12 23:29:37 +08:00
✨ 更新3.3版本
This commit is contained in:
parent
674a9cdfd6
commit
580ca750f5
@ -258,7 +258,7 @@ def create_wiki_matcher(pattern: str, help_fun: str, help_name: str):
|
|||||||
try:
|
try:
|
||||||
await maps.finish(
|
await maps.finish(
|
||||||
MessageSegment.image(state['img_url'].format(config.github_proxy, match_alias.character) if
|
MessageSegment.image(state['img_url'].format(config.github_proxy, match_alias.character) if
|
||||||
state['img_url'].startswith('http') else state['img_url'].format(
|
not state['img_url'].startswith('http') else state['img_url'].format(
|
||||||
match_alias.character)))
|
match_alias.character)))
|
||||||
except ActionFailed:
|
except ActionFailed:
|
||||||
await maps.finish(MessageBuild.Text(f'没有找到{name}的图鉴'))
|
await maps.finish(MessageBuild.Text(f'没有找到{name}的图鉴'))
|
||||||
@ -269,7 +269,7 @@ def create_wiki_matcher(pattern: str, help_fun: str, help_name: str):
|
|||||||
if true_name:
|
if true_name:
|
||||||
try:
|
try:
|
||||||
await maps.finish(MessageSegment.image(state['img_url'].format(config.github_proxy, match_alias)
|
await maps.finish(MessageSegment.image(state['img_url'].format(config.github_proxy, match_alias)
|
||||||
if state['img_url'].startswith('http') else state[
|
if not state['img_url'].startswith('http') else state[
|
||||||
'img_url'].format(match_alias)))
|
'img_url'].format(match_alias)))
|
||||||
except ActionFailed:
|
except ActionFailed:
|
||||||
await maps.finish(MessageBuild.Text(f'没有找到{name}的图鉴'))
|
await maps.finish(MessageBuild.Text(f'没有找到{name}的图鉴'))
|
||||||
@ -290,10 +290,10 @@ def create_wiki_matcher(pattern: str, help_fun: str, help_name: str):
|
|||||||
match_alias = state['match_alias']
|
match_alias = state['match_alias']
|
||||||
if choice.isdigit() and (1 <= int(choice) <= len(match_alias)):
|
if choice.isdigit() and (1 <= int(choice) <= len(match_alias)):
|
||||||
try:
|
try:
|
||||||
await maps.finish(
|
await maps.finish(MessageSegment.image(
|
||||||
MessageSegment.image(state['img_url'].format(config.github_proxy, match_alias[int(choice) - 1])
|
state['img_url'].format(match_alias[int(choice) - 1]) if state['img_url'].startswith('http')
|
||||||
if state['img_url'].startswith('http') else state['img_url'].format(
|
else state['img_url'].format(config.github_proxy, match_alias[int(choice) - 1])))
|
||||||
match_alias[int(choice) - 1])))
|
|
||||||
except ActionFailed:
|
except ActionFailed:
|
||||||
await maps.finish(MessageBuild.Text(f'没有找到{match_alias[int(choice) - 1]}的图鉴'))
|
await maps.finish(MessageBuild.Text(f'没有找到{match_alias[int(choice) - 1]}的图鉴'))
|
||||||
if choice not in match_alias:
|
if choice not in match_alias:
|
||||||
@ -308,7 +308,7 @@ def create_wiki_matcher(pattern: str, help_fun: str, help_name: str):
|
|||||||
MessageSegment.text(f'看来旅行者您有点神志不清哦(,下次再问{NICKNAME}吧') + MessageSegment.face(146))
|
MessageSegment.text(f'看来旅行者您有点神志不清哦(,下次再问{NICKNAME}吧') + MessageSegment.face(146))
|
||||||
try:
|
try:
|
||||||
await maps.finish(MessageSegment.image(state['img_url'].format(
|
await maps.finish(MessageSegment.image(state['img_url'].format(
|
||||||
state['img_url'].format(config.github_proxy, choice) if state['img_url'].startswith(
|
state['img_url'].format(config.github_proxy, choice) if not state['img_url'].startswith(
|
||||||
'http') else state['img_url'].format(choice))))
|
'http') else state['img_url'].format(choice))))
|
||||||
except ActionFailed:
|
except ActionFailed:
|
||||||
await maps.finish(MessageBuild.Text(f'没有找到{choice}的图鉴'))
|
await maps.finish(MessageBuild.Text(f'没有找到{choice}的图鉴'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user